Artificial Intelligence

Notion of path in a graph

The notion of a path in a graph is  clear and is shown below

•             Suppose G (V,E) is a graph with vertices v¬0, v1,v2,……,vk. and edges are e1,e2,……..,ek in which edge  ei={vi-1,vi} for i= 1,…,k.

•             The alternating sequence that I get of vertices and edges , starting from the vertice v0 to vk is a path from  v0 to vk of length k. The length is the number of edges and it is not the number of vertices.

•             The length of the path is 1,2, 3 and 4 so here is a 4 length path. And the path is made up of edges e1,e2,e3,e4 and it had vertices va,  vb,  vc  .So the path from the start to goal for the given graph is  s, e1,va, e2,vb,e3,vc,e4, g.

Directed graph(Digraph)

A directed graph  or a Digraph in short consists of  a set V of vertices and asset E of directed edges.

•A directed edge is an ordered pair of elements of V .put another  way the pair  G(V,E) with E is a sub set of VxV is a digraph

•Digraphs allow for loops of the form (a, a), it is also possible to have two edges (a, b) and (b, a)  between the vertices  a and b

•We take the ordering of pairs in E to give each edge a direction: namely the edge (a, b) goes from a to b.

•If we draw a digraph ,we draw the edge (a, b) as an arrow from a to b.

Example:

V= {a, b, c, d}

E= {(a ,b),(a, c),(b, a),(c, c),(d, c)}

Lakshmi Durga

Share
Published by
Lakshmi Durga

Recent Posts

What are Template Tags in WordPress? How to Use Template Tags

In wordpress if you are developing new or custom wordpress theme or wordpress plugin then…

2 months ago

Google Search Indexing Issues Started on 31st January to February 2024

If you are experiencing indexing issues of your website then you are not alone and…

3 months ago

Create QR Code for Pages & Post using Plugin in WordPress

On your wordpress website if you want to generate qr code for pages and posts…

3 months ago

Add Google Search Console HTML File Upload on WordPress

If you are trying to verify your WordPress website with google search console with html…

3 months ago

How Do I Add Google Search Console Verification HTML Tag in WordPress?

If you are on wordpress website and wondering how to keep search console html verification…

3 months ago

Why WordPress Too Many Redirects After URL Change

If you are getting too many redirects error on your WordPress website after changing url…

3 months ago