Homework-3-3

.docx

School

J Sargeant Reynolds Community College *

*We aren’t endorsed by this school

Course

205

Subject

Computer Science

Date

Dec 6, 2023

Type

docx

Pages

9

Uploaded by BaronTreeViper20

Report
CSC-208 Home Work 3 1. What is a function from X to Y? A function from set X to set Y is a rule that associates each element in X with exactly one element in Y. 2. Define a one-to-one function. Give an example of a one-to-one function. Explain how to use an arrow diagram to determine whether a function is one-to-one. A one-to-one function assigns unique outputs to distinct inputs. For example, f(x) = 3x is a one-to-one function. In an arrow diagram, if no two arrows point to the same element in the codomain, it's one-to-one. 3. Define an onto function. Give an example of a onto function. Explain how to use an arrow diagram to determine whether a function is onto. An onto function covers the entire codomain with its range. For example, the function h(x) = 2x, with the domain and codomain being real numbers, is onto. In an arrow diagram, if every element in the codomain has at least one arrow pointing to it, it's onto.
4. Determine if function f x ( ) = 3 x 2 - 3 x + 1 is one-to-one, onto, or both. Give justification for your answer. The function f(x) = 3x^2 - 3x + 1 is not one-to-one because it's a quadratic function, and quadratic functions are generally not one-to-one. For example, when you expand f(x), you'll get two solutions for x for most values in the codomain, indicating that multiple inputs can map to the same output. 5. Prove that if n is an odd integer then n 2 4 ê ë ê ú û ú = n - 1 2 æ è ç ö ø ÷ n + 1 2 æ è ç ö ø ÷ . Right side of equation {n - 1/2}{n + 1/2} = (2k + 1 - 1/2)(2k + 1 + 1/2) = (2k + 1/2)(2k + 2/2) = (2k + 1/2)(2k + 1) = 4k^2 + 2k + k + 1/2 = 4k^2 + 3k + ½ Left side of equation [n^2/4] = [(2k + 1)^2/4] = (4k^2 + 4k + 1)/4
= 4k^2/4 + 4k/4 + 1/4 = k^2 + k + 1/4 Right side: 4k^2 + 3k + ½ Left side: k^2 + k + 1/4 both sides are not equal. So, it seems that the statement is not true when n is an odd integer. 6. Define sequence. A sequence is an ordered list of objects, typically numbers, arranged according to a specific rule or pattern. 7. Define decreasing sequence. A decreasing sequence is a sequence in which each term is smaller than or equal to the preceding term. 8. Define non-decreasing sequence. A non-decreasing sequence is a sequence in which each term is greater than or equal to the preceding term. 9. If X is a finite set what is X * ? If X is a finite set, then X* represents the set of all finite sequences made up of elements from X, including the empty sequence. 10. If X is a finite set what is X + ? If X is a finite set, then X+ represents the set of all non-empty finite sequences made up of elements from X. It excludes the empty sequence.
11. Given t n = 3 n - 2 a. Find t 7 t 7=3 7−2=21−2=19 t7=19 b. Find t 100 t 100=3 100−2=300−2=298 t 100=298 c. Find t i i = 1 3 å t 1 ∣∣ t =1=3 1−2=3−2=1 t 1 t =2=3 2−2=6−2=4 t 1 ∣∣ t =2=3 2−2=6−2=4 t 1 t =3=3 3−2=9−2=7 t 1 ∣∣ t =3=3 3−2=9−2=7 Σ t =13 t 1=1+4+7=12 Σ t =13 t 1 is equal to 12. d. t i i = 3 7 Õ t 1 ∣∣ i =3=3 3−2=9−2=7 t 1 t =4=3 4−2=12−2=10 t 1 ∣∣ i =4=3 4−2=12−2=10 t 1 t =5=3 5−2=15−2=13 t 1 ∣∣ i =5=3 5−2=15−2=13 t 1 t =6=3 6−2=18−2=16 t 1 ∣∣ i =6=3 6−2=18−2=16 t 1 t =7=3 7−2=21−2=19 t 1 ∣∣ i =7=3 7−2=21−2=19 i =37 t 1=7 10 13 16 19
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help