Write a recursive function to generate anagrams, C/C++ Programming

An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase. For example the anagram of tea is tea, tae, eat, eta, aet, ate.
Anagrams can be used to solve word jumble problems. If a user provides a series of jumbled letters, all anagrams of the letters can be generated and then checked to see if they exist in a dictionary. The anagrams appearing in the dictionary are printed as solutions to the puzzle.

Your task for this assignment is to first write a recursive function to generate anagrams from a series of letters that the user of your program provides via the keyboard. Your program must then look up the anagrams up in a dictionary to see if they exist and print out the list of the dictionary words for each sequence of letters. You should use a hash table with separate chaining as the structure to store the letter sequences and the dictionary words that were found.

You will be asked to hand in your code, your testing files, and your interpretation of your test results.

Getting Started

Search for information on permutations and how to compute permutations.
Set up your assignment folder in the same way as you did for assignment one.
Use the dictionary file that is in the assignment zip file.
Reuse some of your previous data structures modules.
Musts

You must meet the must requirements to get a mark greater than zero. If you do not meet the musts, your assignment will be given a grade of zero.

Your solution must compile, using a makefile, with no errors or warnings and must run without crashing on the SOCS linux computers used for grading.
Your solution must accept a sequence of letters (no shorter than 2, no longer than 10) from the keyboard and print out the number of anagrams for that sequence of letters.
Your solution must successfully load the dictionary file into a hash table and be capable of using the hash table structure to locate a word.
Your submission must have a README.txt file that describes how to run your program as well as any testing programs you write. The readme file must contain a brief description of the hash function you choose to use. The readme file must contain your name and student number.
Shoulds

If you complete all of the Shoulds and all of the Musts, it is possible for your program to receive full marks.

You should use a recursive function to generate the anagrams from the sequence of letters
You should use a hash table with separate chaining as the structure to store the letter sequences and the dictionary words that can be formed from them.
You should print the results of the program, neatly formatted, to the screen and include the total number of anagrams of the letters in the output.
You should be able to correctly find all of the dictionary words for a sequence of letters.
You should have your solution neatly organized into the folder structure discussed in the section on coding conventions for the class. (src/ bin/ include/ docs/)
Won'ts

This assignment is worth 10% of your final grade. It will be marked out of 100 points. No half marks will be given.

Anagram generation
correct generation
recursive function
Dictionary Hash Table
hash table module
hash function
collision resolution
Hash table for words found
hash table module
hash function
collision resolution
User Interface
Input of letter sequences
Output of results
Testing
adequate testing done
program gives correct results
Coding practises
Comments and Source Code (structure, variable and operation naming conventions)
File/folder organization and file naming conventions
Data structures modules reused appropriately

Posted Date: 3/29/2013 1:47:26 AM | Location : United States







Related Discussions:- Write a recursive function to generate anagrams, Assignment Help, Ask Question on Write a recursive function to generate anagrams, Get Answer, Expert's Help, Write a recursive function to generate anagrams Discussions

Write discussion on Write a recursive function to generate anagrams
Your posts are moderated
Related Questions
Relationship between an Array and Pointers. Consider the following. int arr[] = {0,1,2,3,4,5,6,7,8,9}; If we write arr , it is considered as the address of the first elem

#questio c++ program for drawing thick line

¦It should ask customers to enter details such as their names and addresses. ¦It should print a welcome message that includes the customer’s name. ¦It should provide a list of avai

Question : (a) One of the most common sorting techniques we have in programming is the ‘Bubble Sort'. This technique will be used to sort an array of elements in ascending or

Stage One Define the specification of the program            Add two nxm size matrices   Stage Two Divide the program up into separate modules           Input Matrix         Ad

Explain the Loop Statements in Computer Programming? 1. C gives you a choice of three kinds of loop, while, do while and for. 2. The while loop remain repeating an action until

a program to find the area under curve y=f(x) between x=a and x=b,integrate y=f(x) between the limits of a and b.   #include float start_point, /* G

Write a recursive function recursiveMin that takes an integer array, a starting subscript and an ending subscript as arguments, and returns the smallest element in the array. The

Explain about the Floating point Constants in c language? A floating point constant is the number that contains either a fraction or decimal part. If an exponent is present its

Build a program that calculates a discount for items based on quantity bought each item is $99.99 Ask user to enter the quantity of the items Get the quantity of items from the u