Consider a rectangular array of cells

Assignment Help Computer Engineering
Reference no: EM131274311

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

Reference no: EM131274311

Questions Cloud

Create a form button named create resume : Create a form button named Create Resume. When clicked this button should call a function that generates a new Web page displaying a resume based on the user input.
Develop classroom behavior management strategy for students : Create a PowerPoint presentation in which you use 12-15 slides to develop a Classroom Behavior Management Strategy for students demonstrating anger and aggression toward classmates, teachers, and administration.
Analyze the main functions of the planning : 1a. Analyze the main functions of the planning, organizing, directing, and controlling (PODC) model of management, indicating where managers are most likely to struggle performing these functions. Provide a rationale to support your response.
Was fortune able to get personal jurisdiction over issacs : Fortune Hi-Tech Marketing, Inc. is a direct sales company.- Was Fortune able to get personal jurisdiction over Issacs?
Consider a rectangular array of cells : 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.
What is the heat required in kw : The change in enthalpy of the gas during the cooling process is -6.20 kJ/mol. What is the heat required in kW? Assume the gas behaves ideally and that the changes in kinetic and potential energy are negligible.
Essential role in health assessment and planning : Research plays an essential role in health assessment and planning. What is formative research? How can formative research help the health advocate select and use a theory to strategize a communications campaign for health promotion?
How should the court have ruled : How should the court have ruled? What legal precedents discussed in this case are likely to be relevant to this opinion? Why?
What audience demographic are you targeting : Imagine that the Chicago Cultural Center or the MCA has commissioned you to do an installation on a particular facet of Chicago's Musical Heritage. Your job is to design such a public installation. What topic will you choose? How will it be presen..

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write down an mdi application, using visual basic.net

You have been commissioned to write an MDI application, using Visual Basic.NET, for the new Clothing Store.

  Creating a program is important almost equally important is

creating a program is important. almost equally important is tracking down errors in the program. this process is

  Describe the meaning of storage density

Describe the meaning of storage density

  Make the price of an item for each of the five days

The Last Stop Boutique is having a five-day sale. Each day, starting on Monday, price will drop 10% of the previous day's price. For example, if the original price of a product is $20.00, the sale price on Monday would be $18.00 (10% less than the..

  Write down a function that accepts a score for a class

Write down a function that accepts a score for a driver's license facility, an int or a float, and returns a letter. If the score passed in is less than 75, then the letter returned is an F for Fail. Otherwise, the letter returned is a P for Pass.

  How can you acquire the digital evidence from the computer

How can you acquire the digital evidence from the computer and which methods of collection would you use and why - would you use any special tools, programs, or methods?

  Write down a class grade with a method getnumericgrade

note down  a Java program that translates a letter grade into a number grade. Letter grades are A B C D F, possibly followed by + or -. Their numeric values are 4, 3, 2, 1, and 0. There is no F+ or F-. A + increases the numeric value by 0.3, a - d..

  How to establishing a secure computer room

Include the principles of separation of duties to find out who should be granted access into the computer room and the type of access they should have.

  Write a java application that prompts the user for pairs

Write a Java application that prompts the user for pairs of inputs of a product number (1-5), and then an integer quantity of units sold (these are two separate prompts for input values).

  Write down the worst cardiac simulator of all time

make the worst CARDIAC simulator of all time (in C++) that tells the user how to execute only a single instruction typed as a 3 digit number by the user.

  Write a program that inputs several lines of text

Write a program that inputs several lines of text and a search character and uses function strchr to determine the total occurrences of the character in the lines of text.

  Implement the given class hierarchy inside of a module

Implement the following class hierarchy inside of a module file called polygon.py. Write another "driver" script called project1.py which imports the polygon.py module, reads an input file of polygonal data and writes another file of areas and peri..

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