Use c++ language and answer all three questions. All four functions are provided belowe. Please use these functions noth

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Use c++ language and answer all three questions. All four functions are provided belowe. Please use these functions noth

Post by answerhappygod »

Use c++ language and answer all three questions. All four functions are provided belowe. Please use these functions nothing else.Thanks.
/********************************************************************************************************
* QUESTION 1 *
* Write a function that prints the expression associated with the given tree rooted at the given node. *
* Note that the edges of T will be directed away from the root. *
* ******************************************************************************************************/
void printExpression(Graph T, int root)
{
need coding..........

}

/****************************************************************************************************************************************************
* QUESTION 2 *
* Write a function that makes and returns an n by m grid graph. Vertices must be labeled in increasing order from left to right and top to bottom. *
* **************************************************************************************************************************************************/
Graph makeGrid(int n, int m)
{

need coding..........

Graph G;
return G;
}

/***********************************************************************************************************
* QUESTION 3 *
* Write a function that, given a directed graph, fills vectors with tree, forward, back, and cross edges. *
* *********************************************************************************************************/
//This function signature is provided if you would like to use it but you are not required to do so
int classifyEdgesRecur(int s, int time, Graph &G, vector<Edge> &tree, vector<Edge> &forward, vector<Edge> &back, vector<Edge> &cross)
{

need coding..........
return -1;
}

void classifyEdges(Graph &G, vector<Edge> &tree, vector<Edge> &forward, vector<Edge> &back, vector<Edge> &cross)
{
need coding..........

}
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply