Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IMPORTANT = WRITTEN IN *JAVA LANGUAGE* please and thank you! have a great day. Question 1: Sudoku Solution Validator (100 points) A Sudoku puzzle uses

IMPORTANT = WRITTEN IN *JAVA LANGUAGE* please and thank you! have a great day.

Question 1: Sudoku Solution Validator (100 points) A Sudoku puzzle uses a 9 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 below presents an example of a valid Sudoku puzzle. This question consists of designing a Java multithreaded application that determines whether the solution to a Sudoku puzzle is valid.

image text in transcribed

Question 2: Collatz conjecture (50 points) (This is chapter 3)

The Collatz conjecture concerns what happens when we take any positive integer n and apply the following algorithm:

n={n/2, if n is even 3*n+1, if n is odd

The conjecture states that when this algorithm is continually applied, all positive integers will eventually reach 1. For example, if n = 35, the sequence is

35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1

Write a C program using the fork() system call that generates this sequence in the child process. The starting number will be provided from the command line. For example, if 8 is passed as a parameter on the command line, the child process will output 8, 4, 2, 1. Because the parent and child processes have their own copies of the data, it will be necessary for the child to output the sequence. Have the parent invoke the wait() call to wait for the child process to complete before exiting the program. Perform necessary error checking to ensure that a positive integer is passed on the command line.

WHO EVER IS HELPING ME OUT ! WISH YOU THE BEST ! THANKS. BOTH PART OF THE QUESTION ARE VERY IMPORTANT TO GAIN ALL 150 POINTS. (JAVA LANGUAGE)

6 2 4 5 3 9 1 8 7 5 8 1 376 1 4 2 9 5 4 3 8 6 5 7 29 5 8 2 4 7 3 6 1 9 7 3 71 9 5 6 8 4 2 9 6 1 8 2 4 3 2. 8 4 7 3 9 1 6 Solution to a 9 x 9 Sudoku puzzle. . 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 columns, you could create nine separate threads and have each of them check one column. You do not have to create a GUI for this program. However, if you find the homework interesting, you can add a GUI component to your solution

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

Assess the utility and effect of the Subchapter S election.

Answered: 1 week ago

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago