Question

If you had graph data (you have an image) how do you write it in a...

If you had graph data (you have an image) how do you write it in a program? I mean how do you represent it in a program? What structure would you use to write the graph? I mean how do you code it in a program for the computer to read the graph? A computer can’t read a drawing, so how do you code the program to read the graph? What structure would you use in a computer so the computer can read the graph? Explain in your own words.

Homework Answers

Answer #1

first of all if you have a image than you will have to go for OCR which is concept of machine learning you will give a image as an input than computer will read a image and it will automatically identify the graph and will represent the graph using the programe.

here for storeing the graph we will use pointers and class to represent the graph. you will have to enter the garph node value with edge as input.

i will make a class called garph it will have two member noofvertices and one list to store the graph.

here i can use the adjancy matrix or adjantancy list to store the graph

adjantancy matrix:

here for ith row and jth coloum if the value of that cell is 1 than it wiil have the edge between the ith row to jth column.

like wise 2.Adjacency List:

here 1--->2---->4---->3 there is a edge in between that node. in a doubly linked list the weight will be also stored.

we can do it usig like one of these method.

in that class which we have named a graph i will add a function named add_edge(u,v)

this function will store my edge between u and v. i will store it in a list of our member.

that function is main.

and the last function is to print the garph in whatever manner you like to print.

before creating a class Graph i will create a one more class node which will have only two data member node_data and one pointer to store the information and to point the other node.

if you have till query than let me know.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Do not write the program, just explain in your own words, how you would achieve this....
Do not write the program, just explain in your own words, how you would achieve this. If you had graph data (you have an image) how do you write it in a program? I mean how do you represent it in a program? What structure would you use to write the graph? I mean how do you code it in a program for the computer to read the graph? A computer can’t read a drawing, so how do you code...
If you have got a connected graph, how do you find a spanning tree? What is...
If you have got a connected graph, how do you find a spanning tree? What is a spanning tree in a connected graph? Explain in your own words.
NO DATA YET-NOT SURE ON HOW TO DO IT-STARTING WITH HOW DO I ATTAIN THE DATA?...
NO DATA YET-NOT SURE ON HOW TO DO IT-STARTING WITH HOW DO I ATTAIN THE DATA? WHAT AREAS? Develop your own questionnaire/survey to collect data on a two variables of interest. One variable of interest should be used to estimate a population mean (quantitative) and the other should be used to estimate a proportion (qualitative). Topic 1: Population mean - For one of the variables of interest (Quantitative): ● Present the data you used  ○ Use appropriate displays (graphs) of the...
Explain how you would determine if employees had the reading level necessary to succeed in a...
Explain how you would determine if employees had the reading level necessary to succeed in a training program. How would you determine if employees had the necessary computer skills needed to use a web-based training program? What conditions would suggest that a company should buy a training program from an outside vendor? Which would suggest that the firm should develop the program itself?
In this activity you will explore how ethical considerations impact on programming and demonstrate your ability...
In this activity you will explore how ethical considerations impact on programming and demonstrate your ability to design basic selection structures. Scenario : Medical facilities must often deal with the situation that the number of organs available for transplants are less than the patients desperately in need of such organs . Suppose you have been asked to write a computer program that selects one of several eligible candidates to receive an available organ. CREATE YOUR OWN .BE CREATIVE . Discuss...
When you write code, how do you know that you need to use value or reference?...
When you write code, how do you know that you need to use value or reference? Please show with an example. I know reference is two way communication but it is not clear to me. Thanks
How do you load an image into our Excel Worksheets, and what process do we use...
How do you load an image into our Excel Worksheets, and what process do we use to format the image in Excel?
Factors are qualitative data that are associated with categorization or the description of an attribute. Factors...
Factors are qualitative data that are associated with categorization or the description of an attribute. Factors are often (but not always) represented with words, like colors or names of things. On the other hand, numeric data are generated by numeric measurements. R can store values as factors or numbers, but sometimes you have a choice of how to represent values. 1) I have two apples, one banana, one cherry.  Does it make sense to calculate the "average" of these things? Would...
Describe the structure of an IPv6 address. Write an example How can you write an IPv6...
Describe the structure of an IPv6 address. Write an example How can you write an IPv6 address if it has consecutive 0s. Explain what you do when there are leading 0s àExamples How many bits does a hexadecimal number represent? Give an example of one field. Describe the IPv6 Prefix (also called Network ID in IPv4) and Interface ID (Host ID in IPv4)
Write code for if you have a doubly-liked list that has no tail and how you...
Write code for if you have a doubly-liked list that has no tail and how you would remove the tail and what would be the size of it? (Java for Data Structures and Algorithms)
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT