*Before an agent can start searching for solutions, it must formulate a goal and then use that goal to formulate a problem.*

Problem Formulation & Method Solving in Artificial Intelligence (AI) organizes several steps to formulate a target/goals which require a specific action to achieve the goal.

Hence, today, Problem Formulation & Method Solving in Artificial Intelligence is in use in various domains to formulate the goal based on AI agents.

##### Hence, s**ome methods used in Problem Formulation are :-**

• Tree structure

• Graphical model

• Implementation of graph

**The Tree Structure**

• Connected list, stack, and queue are 1-D data structures.

• Hence, tree is a 2-D data structure.

• Examples:

– Family tree;

– Tournament tree for a football game;

– Organization tree of a company; and

– Directory tree of a file management system.

**Useful terminologies **

• The nodes that have the same parent are known as Siblings.

• Path is a sequence of nodes(no. of nodes) connected by edges

• Level of a node refers to the number of edges contained in the path hence from the root to this node

• Height of the tree indicates the maximum distance from the root to the terminal nodes

**Multi-way tree and binary tree **

• Multi-way tree or multi-branch tree

– Hence, an internal node having more than 2 child nodes is known as a Multi-way tree or multi-branch tree**.**

– Hence, a binary tree is useful both for information retrieval (binary search tree) and for pattern classification (e.g. decision tree).

• Complete binary tree：

– A binary tree is the one in which every node has 2 children. Hence, a binary tree is full, and nodes in the last level are as far left as possible.

## Graphical Analysis

• A graph is in use as 2-tuple where 𝑉 is a set of vertices or nodes; and 𝐸 is a set of edges, arcs, or connections.

𝐺 = (𝑉, 𝐸)

where 𝑉 is a set of vertices or nodes; and 𝐸 is a set of edges, arcs, or connections.

• Hence, Tree is a special graph without cycles.

– Hence, the path which the root forms is unique.

## Adjacency-list representation

• Adjacency-list representation：

– N=|V|：number of nodes

– Hence, we define N lists Adj[0], Adj[1], …, Adj[N-1]

– Adj[i] is the list for the ith node, which basically contains all nodes connected to this node by an edge.

– That is, for any node j contained in Adj[i], (i,j) belongs to the set E of edges.

The above fig. explains the Adjacency-list representation.