discrete math and it’s applications and use sage math when asked to verfiy some answers
Assignment 1: Discrete Mathematics & Its applications By ID: Course: IDS215 Math for CS Instructor: prof Georgios You are required to submit your assignment as a well-presented PDF. You may also write on a graphic tablet and submit a PDF of your work. Here are some notes: • • • Hand-written solutions on paper are also acceptable, so long as they are scanned/photographed clearly and are fully legible. There exist scanning apps that will allow you to take photos of pages and create a PDF from them (Office Lens, for example). Low scores will be assigned for illegible work and images of poor quality. All graphs and supporting code should be included in your PDF file, with a relevant caption. Part 1: Sets and Relations a) Given sets A = {1, 2, 3}, B = {3, 4, 5} and C = {2, 4, 6}. Compute the following: (i) A ∪ B (ii) A ∩ C (iii) B − C (iv) A × B (v) Power set of A Verify your results using SageMath. b) Describe the properties of a symmetric relation. Provide an example of a symmetric relation not found in your textbook. c) Suppose you have a social network represented as a set of people, and the friendship relation represented as an ordered pair of people. If the friendship relation is symmetric and transitive, what kind of social network does it represent? Part 2: Logic, Predicates, and Quantified Statements a) Express the following sentences as predicates where the domain is all people: (i) Ali is a musician. (ii) Everyone loves music. (iii) Some people do not eat meat. b) Explain the difference between a statement that is universally quantified and one that is existentially quantified. Give an example of each. c) Consider the claim, ”If a user enters a correct password, then access is granted.” Express this claim as a logical conditional statement and explain the potential security risks if the converse, inverse, or contrapositive statements are implemented instead. Part 3: Mathematical Induction a) Prove the following statement using mathematical induction: For all positive integers n, the sum of the squares of the first n natural numbers is given by the formula: n(n + 1)(2n + 1)/6. b) Explain the principle of mathematical induction. Why is it particularly useful in the field of computer science? c) Consider a network of computers where each computer can directly send a message to its immediate neighbour. If you are required to design an algorithm that ensures a message sent from one end of the network reaches the other end, how could the principle of mathematical induction assist you in verifying the correctness of your algorithm? Part 4: Relations and Functions a) Define a function f : A → B where A = {1, 2, 3, 4, 5} and B = {2, 4, 6, 8, 10} such that for each x ∈ A, f(x) = 2x. Verify that f is a well-defined function using SageMath. 2 b) Explain the difference between a relation and a function using the language of sets. c) Imagine a database where the set ’A’ represents all employees and the set ’B’ represents all departments in a company. In this context, explain the difference between a relation and a function. Provide examples. Remember to justify your answers where needed and show all workings. The use of SageMath is mandatory when indicated, and advised for checking all other your answers Part 5: Data Science Application a) In the context of data science, assume you have a dataset represented as a set ’D’, where each element is a record of individual patient data including age, gender, and diagnosis. A ’diagnosis’ can be represented as another set ’Diag’, where each element is a unique disease. (i) Define a function ’f’ from ’D’ to ’Diag’ that maps each patient record to a diagnosis. Discuss the properties of this function and its implications in the context of data analysis. (ii) In many real-world datasets, missing values or errors might occur. These irregularities can be represented as a set ’Err’. Define a relation ’R’ from ’D’ to ’Err’. What would be the characteristics of this relation? How would it be different from a function? (iii) In a predictive modeling scenario, we often split the dataset into a training set ’Tr’ and a testing set ’Te’. Can you define a function from ’D’ to ’Tr’ and ’Te’? What are the conditions that this function should satisfy? (iv) Suppose a new patient’s data is represented as a set ’P’ = {age, gender}. A prediction model in machine learning could be seen as a function that maps ’P’ to ’Diag’. Describe how this relates to the concept of functions in discrete mathematics. Remember to show your work and explanations using both mathematical notation and plain English, relating it to the data science context. SageMath can be used to illustrate some of these concepts if you find it helpful.
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.