Question: Crossword Designer Using C++ design a program to design crossword. The following is a simple crossword. Given the list of words: AFT LASER ALE LEE

Crossword Designer

Using C++ design a program to design crossword. The following is a simple crossword. Given the list of words:

AFT LASER

ALE LEE

EEL LINE

HEEL SAILS

HIKE SHEET

HOSES STEER

KEEL TIE

KNOT

+---+---+---+---+---+

| 1 | | 2 | | 3 |

+---+---+---+---+---+

| # | # | | # | |

+---+---+---+---+---+

| # | 4 | | 5 | |

+---+---+---+---+---+

| 6 | # | 7 | | |

+---+---+---+---+---+

| 8 | | | | |

+---+---+---+---+---+

| | # | # | | # |

+---+---+---+---+---+

The numbers 1,2,3,4,5,6,7,8 in the puzzle correspond to the words that will start at those locations.

The variables can be represented in the following table with the specific domain.

 VARIABLE | STARTING CELL | DOMAIN
 ================================================
 1ACROSS | 1 | {HOSES, LASER, SAILS, SHEET, STEER}
 4ACROSS | 4 | {HEEL, HIKE, KEEL, KNOT, LINE}
 7ACROSS | 7 | {AFT, ALE, EEL, LEE, TIE}
 8ACROSS | 8 | {HOSES, LASER, SAILS, SHEET, STEER}
 2DOWN | 2 | {HOSES, LASER, SAILS, SHEET, STEER}
 3DOWN | 3 | {HOSES, LASER, SAILS, SHEET, STEER}
 5DOWN | 5 | {HEEL, HIKE, KEEL, KNOT, LINE}
 6DOWN | 6 | {AFT, ALE, EEL, LEE, TIE}

Task 1. Backtracking

Specify the constraints among variables. Implement a simple backtracking algorithm to come up with a solution for the above puzzle.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!