Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Assignment

The game of Life, invented by the mathematician John H. Conway, is intended to model life in a society of organisms. Consider a rectangular array of cells, each of which may contain an organism. If the array is viewed as extending indefinitely in both directions, then each cell has eight neighbors, the eight cells surrounding it. In each generation, births and deaths occur according to the following rules.

- An organism is born in any empty cell having exactly three neighbors.

- An organism dies form isolation if it has fewer than two neighbors.

- An organism dies from overcrowding if it has more than three neighbors.

- All other organisms survive.

Use a 20 x 20 array to test your program. Print out each generation (i.e. 20 x 20 array) for the first 6 generations. Be sure to printout generation 0.

The data for the above is as follows where each subscript (row,col) represents a life form:

Start life in col 3, 4, 5 and col 20 ie. (1,1) (2,1) (3,1) ... (20,1) and (1,20) (2,20) (3,20) ... (20,20), row 10, 11 and row 19, and the following other matrix locaitons:

3,6 15,18 4,14 17,10

3,7 15,19 5,15 17,11

3,8 16,19 9,4 18,10

4,6 16,18 13,13 18,11

4,7 16,16 15,14 16,10

5,6 17,15 13,15 17,11

5,8 17,18 13,16 15,6

19,6 19,4 19,6 19,7

6,6 17,19 12,14 15,7

7,6 18,18 13,18 16,6

8,7 18,17 12,15 17,6

8,8 17,9 2,6 18,6

20,20 9,8 2,7 12,6

5,7 12,7 2,2 18,2

2,8 2,9 2,10 19,16

4,10 4,11 2,12 19,18

4,13 3,11 2,13

3,13 3,14 13,17

A life form is represented by an asterisk symbol.

You probably already know this but the instructor said that this program is much easier to write if you add extra rows and columns to the outer perimeter of the array.

The results have to be sent to a txt file and then printed from the file. gameOfLife.txt

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92029033
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Task create an array that holds a 20 random integers

Task : Create an Array that holds a 20 random integers between 1-50. Create an iterator that will return the memory address and value for each integer present in the Array.

Suppose that you need to create two-table database to

Suppose that you need to create two-table database to record information for a DVD rental kiosk. The following information needs to be recorded. For all movies: Movie number, title, category, rental rate, and whether or ...

Question you company provides wireless networking services

Question: You company provides wireless networking services. One of your customers complains about the downloading performance being poor. After investigation, you find that the customer's 802.11 wireless network is inte ...

Two people agree to meet at a coffee shop they each

Two people agree to meet at a coffee shop. They each independently pick a random moment in time between 8 a.m. and 9 a.m. and show up exactly at their selected time. But they are very impatient, and only stay for 10 minu ...

Discuss 5 of the most important sql server management

Discuss 5 of the most important SQL Server Management Studio (SSMS) features. Provide references - website link, book, article, etc.

A new machine averages 4 clock cycles per instruction and

A new machine averages 4 clock cycles per instruction, and runs at a system clock of 20 MHz. The Axiom-Verge algorithm set to benchmark the system will take an even 3000 instructions to complete. a) Knowing how many cloc ...

A study investigated whether time perception an indication

A study investigated whether time perception, an indication of a person's ability to concentrate, is impaired during nicotine withdrawal. Smokers were randomly selected and asked to estimate how much time has passed duri ...

Solve the water-jug puzzle given a 3-litter jug named three

Solve the water-jug puzzle given a 3-litter jug, named Three, and a 4-liter jug, named Four. Initially, Three and Four are empty. Either jug can be filled with water from a tap T, and one can discard water from either ju ...

Question suppose that as a dba you are tasked with

Question : Suppose that as a DBA, you are tasked with installing a new database management system in your organization. Would you choose the default system parameters when installing the system software? Explain and supp ...

What is a survey and pros and cons of using this method to

What is a Survey and pros and cons of using this method to collect data are? Have you done a survey? How successful were your results?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As