CLO 1.1 Define and apply the concepts of factors and multiples of integers.pptx
Document Details
Uploaded by SelectiveBowenite3077
Tags
Full Transcript
LSM1013-MATHEMATICS FOR COMPUTING CLO 1.1 Define and apply the concepts of factors and multiples of integers 2 Factors of an integer Definition: A factor of an integer 𝑛 is a number that divides 𝑛 without leaving a remainder. Exampl...
LSM1013-MATHEMATICS FOR COMPUTING CLO 1.1 Define and apply the concepts of factors and multiples of integers 2 Factors of an integer Definition: A factor of an integer 𝑛 is a number that divides 𝑛 without leaving a remainder. Examples: 1. Factors of 12 are 1, 2, 3, 4, 6, and 12. 2. Factors of 18 are 1, 2, 3, 6, 9 and 18. 3 Finding Factors To find the factors of a number 𝑛, start from 1 and go up to 𝑛, checking divisibility of 𝑛 by the integers. Example: Find all factors of 28. Number: Factors 28 1, 2, 4, 7, 14, 28 Practice: Find all factors of 36. Number: Factors 36 4 Finding Factors Practice: Find all factors of 48. Number: Factors 48 Practice: Find all factors of 24. Number: Factors 24 Practice: Find all factors of 45. Number: Factors 45 5 Application of factors For an array of size 16, the factors of 16 are 1, 2, 4, 8, and 16. These factors represent the number of equal parts the array can be divided into. Here’s how these factors determine the division: Factor 1: This implies not dividing the array at all, so the entire array is considered as one part. Factor 2: The array can be divided into 2 parts, each containing 8 elements. If the array is A[0...15], it can be divided into A[0...7] and A[8...15]. Factor 4: The array can be divided into 4 parts, each containing 4 elements. The divisions would be A[0...3], A[4...7], A[8...11], and A[12...15]. Factor 8: The array can be divided into 8 parts, each containing 2 elements. The divisions would be A[0...1], A[2...3], A[4...5], A[6...7], A[8...9], A[10...11], A[12...13], and A[14...15]. Factor 16: The array can be divided into 16 parts, each containing 1 6 Continued… This concept is particularly useful in scenarios where work can be distributed across multiple processors or threads. For instance, in parallel computing, dividing an array into smaller chunks allows for simultaneous processing, which can significantly speed up computation. 7 Properties of factors Factors are always less than or equal to the number Every number has at least two factors: 1 and itself Factors are integral to understanding the divisibility and multiplicative structure of numbers. They help in simplifying complex problems, such as finding the least common data structure size that can accommodate various datasets. 8 Properties of factors Practice 1: Which of the following numbers can be a factor of 18? A) 20 B) 2 C) 19 D) 25 Practice 2: Which of the following is true about the factors of a number? A) Factors can be greater than the number B) Factors are always less than or equal to the number C) Factors can be any number D) Factors are always prime numbers 9 Properties of factors Practice 3: If 12 is a number, which of the following cannot be a factor of 12? A) 1 B) 3 C) 12 D) 15 Practice 4. Given the number 25, which of the following statements is true? A) All factors of 25 are greater than 25 B) Some factors of 25 are greater than 25 C) No factors of 25 are greater than 25 D) 50 is a factor of 25 10 Multiples of an integer Definition: A multiple of an integer 𝑛 is a number that can be expressed as 𝑛×𝑘, where 𝑘 is an integer. Examples: 1. Multiples of 5 are 5, 10, 15, 20, etc. 2. Multiples of 8 are 8, 16, 24, 32, etc. 11 Finding Multiples To find the factors of a number 𝑛, start from 1 and go up to 𝑛, checking divisibility of 𝑛 by the integers. Example: List first four multiples of 7. Number: Multiples 7 7, 14, 21, 28 Practice: Find first six multiples of 4. Number: Multiples 4 Practice: Find first five multiples of 9. Number: Multiples 9 12 Application of multiples Time-driven scheduling system: In a network with a cycle of 3 seconds, a periodic task set to execute at multiples of 3 would run at times 3, 6, 9, 12, and so on. This is an example of a time-driven scheduling system, where tasks are executed at predetermined, regular intervals. Email Sync: An email application might check for new messages every 15 minutes, so the task would run at 15, 30, 45 minutes past the hour, and so on. Sensor Data Collection: In a sensor network, a task to collect data every 5 minutes would execute at 5, 10, 15 minutes, etc. Example: In a system where a task repeats every 4 seconds, what are the first five times it will run? Solution: 4 seconds, 8 seconds, 12 seconds, 16 seconds, 20 seconds. Example: In a network, a data backup task runs every 10 minutes. When will it run for the first four times? 13 Application of multiples Practice 1: A factory's monitoring system checks equipment every 8 minutes. When will it check the equipment the first six times? Practice 2: In a home automation system, weather updates are scheduled every 20 minutes. When will the first five updates occur? Practice 3: A data logger records data every 3 minutes. When will it record data for the first seven times? Practice 4: A network ping test runs every 15 seconds. When will the first four pings occur? Practice 5: An automated email report is sent every 60 minutes. When will the first three reports be sent? 14 Properties of multiples Every Number is a Multiple of Itself: The first non-zero multiple of any number is the number itself, because when it is multiplied by 1, the product is the number. Infinite Multiples: There are an infinite number of multiples for any given integer. This is because you can keep multiplying the number by an increasing count of integers. Greater Than or Equal to the Number: A multiple of a number is always greater than or equal to the number itself, except for the multiple 0, which is a special case as 0 is a multiple of every number. Multiples of 1: Every number is a multiple of 1 since multiplying any number by 1 results in the number itself. Factor Relationship: If B is a multiple of A, then A is a factor of B. This relationship helps in understanding the connection between factors and multiples2. 15 Properties of multiples Example: What is the first non-zero multiple of 7? A) 0 B) 7 C) 14 D) 21 Example: If 36 is a multiple of 6, what does that imply about their factor relationship? A) 36 is a factor of 6 B) 6 is a factor of 36 C) Both are prime numbers D) Neither is a factor of the other 16 Properties of multiples Practice 1: What is the smallest multiple of 8 that is greater than or equal to 8? A) 0 B) 4 C) 8 D) 16 Practice 2: Why are the multiples of 5 infinite? A) Because 5 is a prime number B) Because you can multiply 5 by any integer and get a unique product C) Because 5 has an infinite number of factors D) Because multiples of 5 are always even 17 Properties of multiples Practice 3: What is the smallest multiple of 8 that is greater than or equal to 8? A) 0 B) 4 C) 8 D) 16 Practice 4: Why is every integer a multiple of 1? A) Because 1 is a prime number B) Because multiplying any number by 1 results in the number itself C) Because 1 is an even number D) Because 1 has no factors 18 Properties of multiples Practice 5: Given that 56 is a multiple of 7, what does this say about 7 and 56 in terms of factors and multiples? A) 7 is a multiple of 56 B) 56 is a factor of 7 C) 7 is a factor of 56 D) Both are multiples of each other Practice 6: A database maintenance task is set to run every 30 minutes. What is the smallest multiple of 30 minutes that is greater than or equal to 30 minutes? A) 0 minutes B) 15 minutes C) 30 minutes Thank You