A. 5 seconds :) Good luck!
Answer:
prove that | S | = | E | ; every element of S there is an Image on E , while not every element on E has an image on S
Explanation:
Given that S = { p q |p, q are prime numbers greater than 0}
E = {0, −2, 2, −4, 4, −6, 6, · · · }
To prove by constructing a bijection from S to E
detailed solution attached below
After the bijection :
<em>prove that | S | = | E |</em> : every element of S there is an Image on E , while not every element on E has an image on S
∴ we can say sets E and S are infinite sets
Answer:
def theRoundTrip(movement):
x=0
y=0
for i in movement:
if i not in ["U","L","D","R"]:
print("bad input")
return
if i=="U":
y+=1
if i=="L":
x-=1
if i=="D":
y-=1
if i=="R":
x+=1
return x==0 and y==0