Problem 1101. USC Fall 2012 ACM : Chemical Analysis
This Challenge is to solve Question D, Chemical Analysis, of the USC ACM Fall 2012 Contest.
Given an array M of Element Spectral signatures(m elements by n Spectra) and a Sample spectra of width n, determine the minimum number of elements that could generate the Sample's spectra.
Input: [ A, Sample ]
Output: min_elements;
The minimum number Components to create the Sample Spectra. If no combination exists then output 0.
The full USC data file
Input: [1 1 0 0;0 1 1 1;0 1 1 0;0 1 0 1], [1 1 0 1]
Output: 2 as [1 1 0 0] and [0 1 0 1] can create [1 1 0 1]
The Winning C solution is in the Test Suite to assist - not likely.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers10
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
48474 Solvers
-
Find the longest sequence of 1's in a binary sequence.
6172 Solvers
-
Remove any row in which a NaN appears
8570 Solvers
-
Vectorize the digits of an Integer
317 Solvers
-
Getting the indices from a matrix
635 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!