1. Find the orthogonal projection of the matrix
[[3,2][4,5]] onto the space of diagonal 2x2 matrices...
1. Find the orthogonal projection of the matrix
[[3,2][4,5]] onto the space of diagonal 2x2 matrices of the form
lambda?I.
[[4.5,0][0,4.5]] [[5.5,0][0,5.5]] [[4,0][0,4]] [[3.5,0][0,3.5]] [[5,0][0,5]] [[1.5,0][0,1.5]]
2. Find the orthogonal projection of the matrix
[[2,1][2,6]] onto the space of symmetric 2x2 matrices of trace
0.
[[-1,3][3,1]] [[1.5,1][1,-1.5]] [[0,4][4,0]] [[3,3.5][3.5,-3]] [[0,1.5][1.5,0]] [[-2,1.5][1.5,2]] [[0.5,4.5][4.5,-0.5]] [[-1,6][6,1]] [[0,3.5][3.5,0]] [[-1.5,3.5][3.5,1.5]]
3. Find the orthogonal projection of the matrix
[[1,5][1,2]] onto the space of anti-symmetric 2x2
matrices.
[[0,-1] [1,0]] [[0,2] [-2,0]] [[0,-1.5]
[1.5,0]] [[0,2.5] [-2.5,0]] [[0,0]
[0,0]] [[0,-0.5] [0.5,0]] [[0,1] [-1,0]]
[[0,1.5] [-1.5,0]] [[0,-2.5]
[2.5,0]] [[0,0.5] [-0.5,0]]
4. Let p be the orthogonal projection of
u=[40,-9,91]T onto the...
Program has to be written in ML language.
Write functions in ML to do the following:...
Program has to be written in ML language.
Write functions in ML to do the following:
1. Given a list, return that list with its first and third elements deleted. Assume the length of the list
is at least 3.
2. Given a list of real pairs, return the list containing the larger element in each pair. Examples:
larger_in_pair([]) = []
larger_in_pair([(1.0,2.5),(4.7,3.6),(5.5,8.8)] = [2.5,4.7,8.8]
3. Given two lists of integers, return the list of the sums of the elements in...
Write a function count_div5(nested_list) that takes in a
list of lists of integers, and returns a...
Write a function count_div5(nested_list) that takes in a
list of lists of integers, and returns a list of integers
representing how many integers in each sublist of the original were
divisible by 5.
Examples:
>>> count_div5([[5, 3, 25, 4], [46, 7], [5, 10,
15]])
[2, 0, 3]
>>> count_div5([])
[]
>>> count_div5([[-20, 10, 2, 4, 5], [], [5],
[8, 25, 10], [6]])
[3, 0, 1, 2, 0]
write a python program that include a function named
activity_selection() and take in two arguments, first...
write a python program that include a function named
activity_selection() and take in two arguments, first one would be
the number of tasks and the second argument would be a list of
activities. Each activity would have an activity number, start time
and finish time.
Example activity_selection input and output:
activity_selection (11, [[1, 1, 4 ], [2, 3, 5], [3, 0, 6], [4,
5, 7], [5, 3, 9], [6, 5, 9],[7, 6, 10], [ 8, 8, 11], [ 9, 8,...