Assessment

Descrição

Assessment
kanghsien92
Quiz por kanghsien92, atualizado more than 1 year ago
kanghsien92
Criado por kanghsien92 aproximadamente 8 anos atrás
18
0

Resumo de Recurso

Questão 1

Questão
Tick the answer(s). There can be more than one answers In order to recursively define an entity, we need
Responda
  • A number of base cases - describes simple instances of the entity
  • A number of step cases - describes complicated instances of the entity
  • Define the operations should do for each base cases
  • Define the operations should do for each step cases
  • Come out with the algorithm first

Questão 2

Questão
[40, 20, 3] = [blank_start]40 : [20, 3][blank_end] = [blank_start]40 : 20 : [3][blank_end] = [blank_start]40 : 20 : 3 : [ ][blank_end]
Responda
  • 40 : [20, 3]
  • 40 : 20 : [3]
  • 40 : 20 : 3 : [ ]

Questão 3

Questão
Is the mathematical recursive definition related to programming?
Responda
  • Yes
  • No
  • I am not very sure. But since recursion is used in programming, they should be related?

Questão 4

Questão
add[2, 4, 10] = [blank_start]add( 2 : [4, 10] )[blank_end] = 2 + [blank_start]add[4, 10][blank_end] = 2 + [blank_start]add( 4 : [10] )[blank_end] = 2 + 4 + [blank_start]add[10][blank_end] = 2 + 4 + [blank_start]add( 10 : [ ] )[blank_end] = [blank_start]2 + 4 + 10 + add[ ][blank_end] = 2 + 4 + 10 = 16
Responda
  • add( 2 : [4, 10] )
  • 2 + 4 + 10 + add[ ]
  • add( 10 : [ ] )
  • add[4, 10]
  • add( 4 : [10] )
  • add[10]

Questão 5

Questão
[99, 9] ++ [23, 1] = [blank_start](99 : [9]) ++ [23, 1][blank_end] = 99 : [blank_start]([9] ++ [23, 1])[blank_end] = 99 : [blank_start]((9 : [ ]) ++ [23, 1])[blank_end] = 99 : [blank_start](9 : ([ ] ++ [23, 1]))[blank_end] = 99 : [blank_start](9 : ([23, 1]))[blank_end] = 99 : 9 : [23, 1] = [99, 9, 23, 1]
Responda
  • (99 : [9]) ++ [23, 1]
  • ([9] ++ [23, 1])
  • ((9 : [ ]) ++ [23, 1])
  • (9 : ([ ] ++ [23, 1]))
  • (9 : ([23, 1]))

Questão 6

Questão
Can we prove the property by induction?
Responda
  • Why do we need to prove? Its already proven!
  • Yes we need to prove this

Questão 7

Questão
What are the orders to prove them? 1) Replace the statement with [blank_start]the base case of Lists[blank_end] 2) Prove the replaced statement using [blank_start]the properties given[blank_end] 3) Replace the statement with [blank_start]the step case of Lists[blank_end] 4) Prove the replaced statement using [blank_start]the properties given[blank_end] 5) Make us of [blank_start]the induction hypothesis[blank_end]
Responda
  • the base case of Lists
  • the properties given
  • the step case of Lists
  • the property given
  • the induction hypothesis

Semelhante

The main reason knowledge is produced is to solve problems.
Darrel Hong
LMC questions
sbadger
Essbase Certification
Bob Costas
Medical Physics
Tim Davidson
Skull Bones
Justin Jimmy
Ratio and Proportion
sk.ks205
Proyectos
Rocio Anderson
Frans A en B N-F
Manu Mehendale
Haruki Murakami
Fernando Lopez O
Harrys Hannibal Quiz
hmasterson16