Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please solve the graph question in detail and clear. Question 2: Tracing an Epidemic 1 An email with a malicious attachment has evaded the antivirus
Please solve the graph question in detail and clear.
Question 2: Tracing an Epidemic 1 An email with a malicious attachment has evaded the antivirus software of company X. We know that the CEO's computer was infected during a business trip last month. Since then, investigators have been trying to determine whose mailboxes could be infected. For an employee's mailbox to be infected, he or she must have received and read an email sent by an already affected employee. Starting from the time 0 denoting when the CEO's mailbox was first infected, investigators have "metadata" for all the emails from all employees in the form (Pi, Pj, tk, t) meaning that employee P; sent an email at time tk to employee Pj, and P; opened the email at time ti > tk. We assume that P;'s mailbox is infected instantaneously at time t if Pi's mailbox was infected before time tk You are given a collection of email records in the form given above, and you know that person Po is the CEO who was infected at time t = 0. we ask if a given person of interest P; could have been infected at a given time of interest t = T. 2(A) Write an algorithm that, given a person P; and time T, determines if P;'s mailbox was infected before or at time T. What is the worst case complexity of your algorithm in terms of the number of persons [P], and the number of emails sent |E|. Hint You need to first make a graph that represents the possible flow of the "infection" through emails. It is easier to make a complicated graph in this case, one where each vertex represents more than just a person) and then run a simple graph algorithm (one of the vanilla algorithms we learned this week, ie BFS/DFS/Topological sort) rather than making a simple graph and running a complicated ad-hoc algorithm on it (lf your algorithm requires table lookups or passing on metadata specific to the problem at hand, it's probably too complicated). YOUR ANSWER HERE 2(B) Write an algorithm that prints out each person who is infected in increasing order of the times in which they first got infected. Question 2: Tracing an Epidemic 1 An email with a malicious attachment has evaded the antivirus software of company X. We know that the CEO's computer was infected during a business trip last month. Since then, investigators have been trying to determine whose mailboxes could be infected. For an employee's mailbox to be infected, he or she must have received and read an email sent by an already affected employee. Starting from the time 0 denoting when the CEO's mailbox was first infected, investigators have "metadata" for all the emails from all employees in the form (Pi, Pj, tk, t) meaning that employee P; sent an email at time tk to employee Pj, and P; opened the email at time ti > tk. We assume that P;'s mailbox is infected instantaneously at time t if Pi's mailbox was infected before time tk You are given a collection of email records in the form given above, and you know that person Po is the CEO who was infected at time t = 0. we ask if a given person of interest P; could have been infected at a given time of interest t = T. 2(A) Write an algorithm that, given a person P; and time T, determines if P;'s mailbox was infected before or at time T. What is the worst case complexity of your algorithm in terms of the number of persons [P], and the number of emails sent |E|. Hint You need to first make a graph that represents the possible flow of the "infection" through emails. It is easier to make a complicated graph in this case, one where each vertex represents more than just a person) and then run a simple graph algorithm (one of the vanilla algorithms we learned this week, ie BFS/DFS/Topological sort) rather than making a simple graph and running a complicated ad-hoc algorithm on it (lf your algorithm requires table lookups or passing on metadata specific to the problem at hand, it's probably too complicated). YOUR ANSWER HERE 2(B) Write an algorithm that prints out each person who is infected in increasing order of the times in which they first got infectedStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started