Here is my problem: Given numbers x1, ... xn. Numbers meet n files size and memory disk capacity D. We must understand, can we that files divided into 3 disks. The amount of file size recorded on any disc cannot exceed the disk capacity D. Let’s estimate that this computational task is in class NP. What is extra information (certificate), that in this case is required for check algorithm?
Here is my idea, but I am really not sure:
Extra information: 3 sets in one set, that contains x1, ..., xn files. That sets could be recognized if string supplement by variables y1,y2,y3, which would be placed at the beginning of the thought set and contain a symbol, which is different from a number so that it doesn't interfere with the file size string.
Checker: Must be able to check if the total size of each set of files does not exceed the disk D capacity. The algorithm might be simple for this by introducing a variable. To variable would add the downloaded file size until either this amount exceeds the capacity of the D disk or until the new set start symbol is reached. At the moment when the capacity of D disk is exceeded, a negative response is issued, otherwise positive. The time consuming of this algorithm is O (n).
I don’t know how to estimate that this algorithm is class NP. Because NP can be solved by a non-deterministic Turing machine in O(n^k) time.