Read through the programming project - Sudoku Solution Validator from the pages provided below and finish it using the pthreads under UNIX . The input
Read through the programming project - Sudoku Solution Validator from the pages provided below and finish it using the pthreads under UNIX.
The input will be a txt file whose name is given on the command line. This file contains digits 0-9 in a 9x9 grid. There will be a space between each digit so that you may read in the data either as integers or as characters. The sample txt files 1 and 2 are provided below.
Create the threads in the following way: one thread for the first three rows, one for the middle three rows, one for the last three rows, one for the first three columns, one for the middle three columns, one for the last three columns, one for the top three subgrids, one for the middle three subgrids, and one for the bottom three subgrids. The total number of threads is 9 (without including the parent thread).
The output of the program should be displayed to the screen with a message stating whether the Sudoku solution is valid or not.
amming Projects Project 1 Sudoku Solution Validator A Sudoku puzzle uses a 9 x 9 grid in which each column and row, as well as each of the nine 3 3 subgrids, must contain all of the digits 1 . . . 9, Figure 4.19 presents an example of a valid Sudoku puzzle. This project consists of designing a multithreaded application that determines whether the solution to a Sudoku puzzle is valid There are several different ways of multithreading this application. One suggested strategy is to create threads that check the following criteria: A thread to check that each column contains the digits 1 through 9 A thread to check that each row contains the digits 1 through 9 Nine threads to check that each of the 3 3 subgrids contains the digits 1 through 9 . . This would result in a total of eleven separate threads for validating a Sudoku puzzle. However, you are welcome to create even more threads for this project. For example, rather than creating one thread that checks all nine amming Projects Project 1 Sudoku Solution Validator A Sudoku puzzle uses a 9 x 9 grid in which each column and row, as well as each of the nine 3 3 subgrids, must contain all of the digits 1 . . . 9, Figure 4.19 presents an example of a valid Sudoku puzzle. This project consists of designing a multithreaded application that determines whether the solution to a Sudoku puzzle is valid There are several different ways of multithreading this application. One suggested strategy is to create threads that check the following criteria: A thread to check that each column contains the digits 1 through 9 A thread to check that each row contains the digits 1 through 9 Nine threads to check that each of the 3 3 subgrids contains the digits 1 through 9 . . This would result in a total of eleven separate threads for validating a Sudoku puzzle. However, you are welcome to create even more threads for this project. For example, rather than creating one thread that checks all nineStep by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started