Math & Computer Science Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is dependency injection?

A

Rather than a client object creating its own dependencies or services, they are supplied by someone else so that the client doesn’t need to know how to create the service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are eigenvectors and eigenvalues?

A

Eigenvectors of a linear transformation (matrix) are not changed except in magnitude (the corresponding eigenvalue). They can form the basis vectors of a transformation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a multiplexer?

A

A logic gate that toggles between the value of 2 inputs depending on the selector

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does an ALU do? How is it made?

A

It can do many different calculations (AND, NOT, addition, negation, etc) on inputs depending on several other inputs that can be relatively elegantly designed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can you create memory from NAND gates?

A

Build a flip-flop using a looped NAND gate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is machine language?

A

Binary instructions to a computer corresponding to different ALU calculations and storage into registers and memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is assembly?

A

A human readable version of machine language e.g. D=A+1, @variable with labels

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the 3 main components of a computer?

A

ROM (instructions), CPU, and Memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is an assembler?

A

Turns assembly into machine language, including converting various labels and variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does a Virtual Machine do?

A

Provides indirection between a high level language and assembly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How are Virtual Machines implemented?

A

Stack Machine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How are function calls represented in a VM?

A

All arguments are already on the stack. Add the return code address and other pointers. Reserve space for the local variables. Move the stack pointer and jump

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How are methods and constructors different from regular function calls?

A

They also either allocate space or add a “this” reference

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How are variables tracked in a compiler?

A

A linked list of Symbol tables that each go deeper into scope

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does an operating system take care of?

A

Memory management, device input, output, strings, arrays, math, initializing everything above

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is Godel’s Theorem of Incompleteness?

A

All consistent axiomatic formulations of number theory include undecidable propositions

OR

Any system sufficiently powerful to express arithmetic is either incomplete or inconsistent

17
Q

What was Hilbert’s program?

A

Split mathematics (basic strings) and meta-mathematics (defining statements about such strings) to develop absolute proofs that don’t depend on other systems

18
Q

How does Godel numbering work?

A

Assign Godel numbers to all operations, variables, statements, predicates, and sequences of statements using clever schemes of multiplying prime numbers so that they are all unique

19
Q

What is the halting problem? How can we prove it is undecidable?

A

Decision problem for whether a given program halts on a given input.

Proof by contradiction. Assume it exists. Create a new program that takes an input and runs that input on that program. Halt if it doesn’t and loop if it does. Give that program as an input to itself l, which leads to a contradiction.

20
Q

What is a convolutional neural network?

A

Apply a kernel across an image to aggregate data, which creates a filtered set of linear combinations of local feature. Run that through a neural net

21
Q

What is a Recurrent Neural Network?

A

Takes input and then feeds back into itself. It can take 1 or multiple inputs and generate 1 or multiple outputs. Good for sequential data or keeping memory

22
Q

What is a Recursive neural network?

A

Aggregates into a hierarchical structure.

23
Q

How is 3-SAT NP Complete?

A

3-SAT is NP because you can brute force it.

According to Cook-Levin, you can simulate a nondeterministic Turing Machine into SAT, and then SAT is reducible to 3-SAT

24
Q

What is Benford’s Law? Why does it happen?

A

In many real life datasets, the leading digit is likely to be small. This tends to apply to values across multiple orders of magnitude, especially power laws

25
Q

What does it mean for Problem A to be reducible to Problem B? What is an example?

A

We can convert Problem A into Problem B, so if we can solve Problem B, we can solve Problem A.

For example, we can reduce adding a list of numbers to the Sum of 2 numbers.

26
Q

What does it mean for Problem A to be NP Complete? What does it intuitively mean?

A
  1. Problem A is in NP
  2. For all NP problems B, B is poly-time reducible to A

NP Complete problems are the hardest NP problems, and you can use them to solve all NP problems.

27
Q

What does it mean for Problem A to be NP Hard?

A

For all NP problems B, B is poly-time reducible to A. This is the second condition of NP Complete.

28
Q

What are the three parts of a floating point number?

A

Sign, exponent, significand