USE OCAML PROGRAMMING LANGUAGE :

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

USE OCAML PROGRAMMING LANGUAGE :

Post by answerhappygod »

USE OCAML PROGRAMMING LANGUAGE :
Use Ocaml Programming Language 1
Use Ocaml Programming Language 1 (64.14 KiB) Viewed 49 times
1 Contagion = (a) Write a function printmat : bool array array -> unit = <fun> that < given a bool matrix it prints it on screen with ones and zeros, instead of true and false. (b) Write a function onstepcontagion : bool array array -> bool array array = <fun> that given a rectangular bool matrix, where true repre- sents an infected square and false represent non-infected square it calculates the next step of infection. Infected squares remain infected indefinitely, non-infected squares become infected if the they are vertically/horizontally adjacent to at least two other infected squares.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply