Assessment

Descripción

Assessment
kanghsien92
Test por kanghsien92, actualizado hace más de 1 año
kanghsien92
Creado por kanghsien92 hace más de 8 años
18
0

Resumen del Recurso

Pregunta 1

Pregunta
Tick the answer(s). There can be more than one answers In order to recursively define an entity, we need
Respuesta
  • 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

Pregunta 2

Pregunta
[40, 20, 3] = [blank_start]40 : [20, 3][blank_end] = [blank_start]40 : 20 : [3][blank_end] = [blank_start]40 : 20 : 3 : [ ][blank_end]
Respuesta
  • 40 : [20, 3]
  • 40 : 20 : [3]
  • 40 : 20 : 3 : [ ]

Pregunta 3

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

Pregunta 4

Pregunta
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
Respuesta
  • add( 2 : [4, 10] )
  • 2 + 4 + 10 + add[ ]
  • add( 10 : [ ] )
  • add[4, 10]
  • add( 4 : [10] )
  • add[10]

Pregunta 5

Pregunta
[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]
Respuesta
  • (99 : [9]) ++ [23, 1]
  • ([9] ++ [23, 1])
  • ((9 : [ ]) ++ [23, 1])
  • (9 : ([ ] ++ [23, 1]))
  • (9 : ([23, 1]))

Pregunta 6

Pregunta
Can we prove the property by induction?
Respuesta
  • Why do we need to prove? Its already proven!
  • Yes we need to prove this

Pregunta 7

Pregunta
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]
Respuesta
  • the base case of Lists
  • the properties given
  • the step case of Lists
  • the property given
  • the induction hypothesis
Mostrar resumen completo Ocultar resumen completo

Similar

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