There will be some problem subtasks in the competition. Fewer points if solved for small input range, more points if solved for large input range. Make Responsive Portfolio Website Design Learn – HTML – CSS – JavaScript
If you can figure out the solution for the big one, the same code can solve the small one, but the reverse is not true. If you think it will be too late to solve the big subtask, then it is wise to solve the small one and pick up some points quickly and then think about the big one.
When two people solve the same problem, tiebreakers are made by who submitted the wrong code how many times and how quickly they solved it, so your strategy for when to solve a problem can decide whether you win or lose. Besides, you should think about what to do if you get wrong answer or TLE or Runtime error.
Make Responsive Portfolio Website Design Learn – HTML – CSS – JavaScript
If you can’t solve a problem after several attempts, it’s a good strategy to put it aside and solve another problem and come back to the previous one, many people get stuck on one problem and finish the whole contest, it can’t be done at all. Always keep an eye on the Ranklist, the problem that more people are solving is more likely to be easier. But if you can’t do that, don’t panic, just keep your head down and solve another problem, come back to it later.
There is no way that the description of the problems or the input-output format will be exactly like this text, you have to read the problem carefully and understand it. Judges and volunteers are there to help if you have trouble understanding something. To prepare for the competition, you can solve some problems in the beginner section of Lightoz. Also you can solve UVA Online Juz, I have written here how to solve it.
Make Responsive Portfolio Website Design Learn – HTML – CSS – JavaScript
Besides, the link of Subin Bhai’s book that I have given above also contains some simple problems for practice. If you can write the code of basic numbers, analysis of products, solving problems, some simple geometry problems, arranging numbers from small to large, binary search, then it will be very useful in the competition. Your practice will be useful to solve any problem. The official website also has a lot of useful information (http://www.nhspc.org/how-to).
Those who can participate in such a competition in schools and colleges are really lucky. Hope you enjoy the competition. Good luck to everyone, see you on the 8th at Dhaka University!
Before Download
You must Join our Facebook Group and Subscribe YouTube Channel
All Links in Below:
Hand in Graph Theory-12 – Maximum Flow (2)
In the previous episode we saw how to find the maximum flow using the Ford-Fulkerson method. In this section we will look at some simple variations of the maximum flow problem.
Multiple Sources/Sinks:
In the previous episode I asked a question like “In our problem source and sink were one. But how does the algorithm change if water enters the graph through multiple nodes and water exits through multiple nodes?” That is, if there are multiple sources or sinks, what to do is asked.
In Figure-1, the blue nodes on the left are the sources and the green nodes on the right are the sinks.
A simple way to apply the Edmund Karp algorithm to such graphs is to create super-sources and super-sinks. A super source is a node that is connected to all sources by directed edges. Similarly, super sync is connected with directed edge to every sync. And the capacity of these edges will be infinite.
Figure-2 shows super source and super sink. Infinity can be any value greater than the combined capacity of all edges. Now we can find the maximum flow in this graph using simple flow algorithm.
Node Capacity:
So far all graphs have fixed capacity of edges, not nodes. But in reality many problems can have node capacity. For example, suppose a country has a fixed car capacity for each road as well as each city, the graph for that country might look like Figure-3:
In the picture, I have selected only one node and 2 edges, not the entire graph, the capacity of the edge entering the node is 5, the capacity of the edge that has gone out is 7, while the capacity of the node itself is 4. In the previously learned algorithm we used an array to account for edge capacity, we can still work with that array, the idea is to split the node into two parts, and join the two parts with new edges. It will be clear if you look at Figure-4:
We split node A into two nodes Ain and Aout. Now the edges that entered A in the original graph will enter Ain and the edges that exited from A in the original graph will now exit from Aout. An edge will enter Ain from Ain whose capacity is equal to the capacity of the edge.
Now you can safely use the previous algorithm. When writing the code, how to divide the node in two, what will be the case in the case of undirected graph, it is your job to think!
Edge Disjoint Path:
Two friends start from the same node and want to reach the same destination but both want to use different routes, that means 2 people can never use the same edge. Such a path is called an edge disjoint path. You need to tell whether a graph has two edge disjoint paths. An example is shown in Figure 5:
In the figure, both of them want to travel from the source node on the left to the sink node on the right. Two edge-disjoint paths are shown using red and blue colors.
Edge disjoint paths can be derived using simple max-flow. The starting node will be the source and the destination node will be the sink. Now make the capacity of all edges equal to 1. Now if you can send two flows from source to sink that means there are two disjoint paths. Since the capacity of each edge is 1, it is not possible to have a common edge between the two paths taken by 2 flows.
Before Download
You must Join our Facebook Group and Subscribe YouTube Channel
All Links in Below:
In the same way you can figure out the maximum number of disjoint paths a graph can have or what would happen if there were K friends instead of two friends.
Now the question is if you want to minimize the total length of two disjoint paths if each path has a fixed length then how do you change the flow algorithm? If you can figure it out, solve the uva 10806 problem, the problem name itself says how to solve it!
Today’s episode ends here. A discussion of min-cuts and matching will have to wait for another episode. The difficult part of the Max-Flow problem in the contest is how to create the graph, how to add the edges, find out the capacity of any edge, after doing this, it is easy to continue the flow algorithm. So you have to practice a lot to master these things.
Some problems:
Down Went Titanic
Clever Naming Pattern
Diagonal Sum
Happy Coding!
Before Download
You must Join our Facebook Group and Subscribe YouTube Channel
All Links in Below:
Join Our FreeWebsiteCreate Facebook Group to get an instant update for projects, templates, design resources, and solutions.
Join Our YouTube Channel & Subscribe with Bell Icon for New Video:
Join Our Official Facebook Page For the Latest updates All Code Projects are Free:
Visit our service page to get premium services.
Free Website Create – HTML CSS, PHP, JavaScript Programming Projects For Free
Follow Us
Thank You,
Before Download
You must Join our Facebook Group and Subscribe YouTube Channel
FreeWebsiteCreate.net tries to provide HTML, CSS, SCSS, JavaScript, React, Android Studio, Java, PHP, Laravel, Python, Django, C#(C Sharp), and ASP.net-related projects 100% free. We try to make learning easier. Free Website Create always tries to give free projects to those who are new learners. Free projects and source code will help to learn easily. They can save time and learn more. In this post, we share a free portfolio project website code with HTML and CSS. This free code portfolio contains a single landing page with a responsive design. In this post, we get a free best carpenter and craftsman service website designed by FreeWebsiteCreate with HTML, CSS, Bootstrap, and JavaScript.