Get Instant Help From 5000+ Experts For

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Solutions to Three Graph Theory Problems

Problem 1

Consider a set of four-letter words. Two four-letter words are said to be adjacent if they differ in only one position. So, for example, lame is adjacent to same, lime, late and lamb among others.

(a)Consider the following small set of four-letter words: {gate, game, rate, rats, star, part, pant, path, ants, bath, cats, stab}

• Draw the graph on this set.
• Write down the adjacency list representation.
• How many edges are there?
• How big is the largest connected component?

(b) (This part needs coding) You are provided with a list of 1024 common four-letter words (on the website).Â  Build the adjacency list representation of the graph and then answer the following questions based on it.

• How many edges are there?
• What are all the neighbors of word?

(c) Thereâ€™s a type of word puzzle where you have to transition from one word to another changing only one letter at a time. (Naturally it is cutest when the start and end words are related!) For example: cats --> mats --> mate --> mace --> mice

Which algorithm from class is useful in finding the best solution to such a word puzzle?

Implement the algorithm and use your graph from part (b) to solve the following word puzzles. Submit the solutions in your write-up (Word-puzzle lovers, beware: your solu- tions must use only words that are in the given word list.)

• Transform root into tree