This blog provides acm problem solution, uva problem solution, Algorithms, Tutorials, Programming resource and some Articles.
menu
- Volume C(10000-10099)
- Volume CI(10100-10199)
- Volume CII (10200-10299)
- Volume CIII (10300-10399)
- Volume CIV (10400-10499)
- Volume CV (10500-10599)
- Volume CVI (10600-10699)
- Volume CVII (10700-10799)
- Volume CVIII (10800-10899)
- Volume CIX (10900-10999)
- Volume CX (11000-11099)
- Volume CXI (11100-11199)
- Volume CXII (11200-11299)
- Volume CXIII(11300-11399)
- Volume CXIV(11400-11499)
- Volume CXV(11500-11599)
- Volume CXVI(11600-11699)
- Volume CXVII(11700-11799)
- Volume 118(11800-11899)
- Volume 119(11900-11999)
Algorithm of 102- Ecological Bin Packing
In this problem have three color bottol B, G, C and three recycle or bucket. given some bottol each bucket each color you need to minimum change as a result same color bottol in only one bucket . if more than one combination precedence of alphabatic order.
102- Ecological Bin Packing
Problem Description
source: https://uva.onlinejudge.org/external/1/p102.html
Bin packing, or the placement of objects of certain weights into different bins subject to certain constraints, is an historically interesting problem. Some bin packing problems are NP-complete but are amenable to dynamic programming solutions or to approximately optimal heuristic solutions.
In this problem you will be solving a bin packing problem that deals with recycling glass.
Recycling glass requires that the glass be separated by color into one of three categories: brown glass, green glass, and clear glass. In this problem you will be given three recycling bins, each containing a specified number of brown, green and clear bottles. In order to be recycled, the bottles will need to be moved so that each bin contains bottles of only one color.
source: https://uva.onlinejudge.org/external/1/p102.html
Bin packing, or the placement of objects of certain weights into different bins subject to certain constraints, is an historically interesting problem. Some bin packing problems are NP-complete but are amenable to dynamic programming solutions or to approximately optimal heuristic solutions.
In this problem you will be solving a bin packing problem that deals with recycling glass.
Recycling glass requires that the glass be separated by color into one of three categories: brown glass, green glass, and clear glass. In this problem you will be given three recycling bins, each containing a specified number of brown, green and clear bottles. In order to be recycled, the bottles will need to be moved so that each bin contains bottles of only one color.
Algorithm of 3n + 1 problem
Consider the following algorithm:
1. input n 2. print n 3. if n = 1 then STOP
100 - The 3n + 1 problem
Problem description
source:https://uva.onlinejudge.org/external/1/p100.html
Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm whose classification is not known for all possible inputs.
Consider the following algorithm:
Given the input 22, the following sequence of numbers will be printed
source:https://uva.onlinejudge.org/external/1/p100.html
Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm whose classification is not known for all possible inputs.
Consider the following algorithm:
1. input n 2. print n 3. if n = 1 then STOP 4. if n is odd then n ←− 3n + 1 5. else n ←− n/2 6. GOTO 2
Given the input 22, the following sequence of numbers will be printed
Subscribe to:
Posts (Atom)