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

Assignment Help:

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


Related Discussions:- Write a recursive function to generate anagrams

C program for removing char which u want, C Program for REMOVING CHAR WHICH...

C Program for REMOVING CHAR WHICH U WANT void main() {           int i,j;           char a[100],r;           clrscr();           for(i=0;i

Write a program to illustrate array of structures, Write a program to illus...

Write a program to illustrate array of structures? struct customer { int id; char name[15]; }; struct customer c[100]; . In the above instance, the array of Structures is

Get reverse engineer to linux game routine analysis, Get Reverse Engineer t...

Get Reverse Engineer to Linux game routine analysis Project Description: I want a fast and efficient reverse engineer with good knowledge of assembly x86 language, strong rev

Overloading binary operators using friend function, Overloading Binary Oper...

Overloading Binary Operators Using Friend Function class SI {float i,p,n,r,a; public: SI(){}; SI(int gp,int gn, int gr); void putdata(void); friend SI operato

Define local classes, A cl a s s c a n b e d e f i n e ...

A cl a s s c a n b e d e f i n e d i n s i d e a b l o c k o r f u n c t i o n.   T h i s t yp e cla s s i s known

What is a hash function, What is a hash function? Hash function: This ...

What is a hash function? Hash function: This is the method from the set 'K' of keys into the set 'L' of memory addresses.   H: K → L These are used to verify the address

Reverse digit function, how can i write reverse digit function like writing...

how can i write reverse digit function like writing 1234 and printing 4321

Develop diablo 2 lod 1.13d dupe method for closed battle.net, Develop Diabl...

Develop Diablo 2 LOD 1.13d Dupe Method for Closed Battle.net This hack is for diablo 2 lord of destruction The program must work on all realms, all cores, all ladders (4x rea

C++, 2. Write C++ code for calculating the time table

2. Write C++ code for calculating the time table

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd