Living cell dies of overcrowding in the next generation

Assignment Help Basic Computer Science
Reference no: EM131240039

DO IN C++

Write a program to implement the simulation of life as described in Scientific American by Martin Gardner. The program will be implemented on a two dimensional surface of size 60 by 60 visible elements. The rules of the simulation are as follows:

1) An initial set of cells are marked as "alive" by the user. This is generation 0. Yourprogram will ask the user to input a set of row and column values to let the user determine which cells are "alive". Display this generation.

2) Cells change for each succeeding generation by the following rules:

a. A living cell dies of overcrowding in the next generation if it currently has 4 or more living neighbors.

b. A living cell dies of loneliness in the next generation if it currently has only 0 or 1 living neighbors.

c. An empty cell becomes a "birth" cell (becomes alive) in the next generation if it has exactly 3 living neighbors.

d. All other cells remain unchanged.

3) The new generation becomes the current generation and is displayed.

4) After displaying each new generation, ask the user if they wish to continue to the next generation or stop at this point.

Reference no: EM131240039

Questions Cloud

How ips anomaly detection differ from misuse detection : How does IPS anomaly detection differ from misuse detection? - What is computer forensics? - What is a honey pot? - What is desktop management?
Explain key developments in the global environment : What will be the key developments in the global environment of business during the next five years? On the basis of these, what will be the greatest challenges that firms from the advanced industrialized countries will face?
What might be the consequences of not involving nurses : Reflect on your own experiences with your organization selecting and implementing new technology. As an end user, do you feel you had any input in the selection or and planning of the new HIT system?
Write the contrapositive of the statement : Using truth tables, verify that the statement if I am at the combination Pizza Hut and Taco Bell, then I am at the Pizza Hut is always true.
Living cell dies of overcrowding in the next generation : a. A living cell dies of overcrowding in the next generation if it currently has 4 or more living neighbors. b. A living cell dies of loneliness in the next generation if it currently has only 0 or 1 living neighbors.
Reduce the temptation to become a hacker : Most hackers start their careers breaking into computer systems as teenagers. - What can we as a community of computer professionals do to reduce the temptation to become a hacker?
Implement methods for establishing a constructive structure : develop and implement methods for establishing a constructive organizational structure and culture that fosters positive employee and employer relationships
Rewrite every cat drinks beer as an implication : Using truth tables, verify that the converse of a statement is not logically equivalent to the original statement. (Suggestion: make the columns P, Q, P ⇒ Q, and Q ⇒ P, and compare the last two columns.)
Do you think cert should continue to post security holes : Some experts argue that CERT's posting of security holes on its Web site causes more security break-ins than it prevents and should be stopped. - What are the pros and cons on both sides of this argument?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Find the type of language of the below languages

Find the type of language of the below languages L1 = {0^i1^j|i!=j}; L2 = {0^i1^j|i=j},L3={0^i1^j|i=2j+1},L4={0^i1^j|i!=2j}

  Hurt the performance of an organization

1. What are the pros and cons of change? Does change help or hurt the performance of an organization? Do you personally like change? Why or why not? 2. What criteria must be met if firms are to achieve a competitive advantage through their employee..

  How big is block size used by the file system to read data

How big is the block size used by the file system to read data? Hint: use reads of varying sizes and plot the time it takes to do such reads. Also, be wary of prefetching effects that often kick in during sequential reads.

  Explain how to configure a switch and router in a 350- to

bull describe how to configure a switch and router in a 350- to 750-word paper in apa format. be sure to include the

  Which data sources you will use in your portfolio workbook

For this module's project piece, determine which data sources you will use in your portfolio workbook. The data sources should report periodically throughout the day on investment performance, keep historical data on performance, and offer other i..

  Discussion of film story

Identify the film's genre and whether or not it was typical or atypical of its genre. Include a discussion of the film's story in your discussion of the film's genre.

  The different types of linux and unix

5 Linux Flavors Look up the different types of Linux and Unix and type up a 1 page listing them out what benefits do each have and where you found the OS at.

  Recursive method written by you or taken from web

What elements should be considered to be included in any recursive method? Discuss these elements using an example (code required) of a recursive method written by you or taken from Web. Try choosing one different from that of any posted thus far.

  Two-page report that compares static

Write a two-page report that compares static, dynamic, and interpretive methods for program compilation and execution. Your report should discuss the advantages and disadvantages of each method.

  Calculating the amount of gasoline consumed

The DOT might sample a group of commuters and collect information on the number of miles driven per day, number of driving days per month, and the fuel economy of their cars. Develop a predictive model for calculating the amount of gasoline consum..

  What must be done so that both generate the same

What must be done so that both generate the same (shorter) instruction sequence?

  Differences between the ipv4 dhcp messages

What were the differences between the IPv4 DHCP messages and the DHCPv6 messages? Examine the captures and explain how DNS can be integrated with DHCP. If you were having problems with DNS, how would you use Nslookup to troubleshoot? Explain your ..

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