Plant Website Template – Nursery Website Design Free Download

A Completely responsive free plant website template with HTML, CSS, Bootstrap, and JavaScript. This is also called a plant nursery website template design and you easily free download it from our website free website create. Plant Website Template – Nursery Website Design Free Download – Gardenia Website Templates

If you are just getting started with your website or blog, you may be wondering what the best template for your site would be. You may have seen a lot of different types of templates and don’t know what to choose. When you are choosing a template for your website, you need to consider the look and feel of your site as well as the content. This article will teach you how to find the best template for your site and how to use it effectively.

Plant Website Template – Nursery Website Design Free Download – Gardenia Website Templates

Combinatorics: Arrangement and de-arrangement calculations

One of the great things about contest programming is that contestants not only need to know good programming but also need to know good math. Especially if you have a good understanding of combinatorics and probability, many types of problems can be solved.

4 hats are arranged side by side, the hats are marked with numbers 1,2,3,4 respectively. How can the hats be shuffled and arranged now? We try to sort it out in a few ways:








How many ways can the total be arranged? You can easily say factorial(4)=24 from the math done in college

can be arranged. Let’s look at it from a programmer’s point of view. There are 4 places or slots, 1 cap can be placed in each slot. Now put any of 1,2,3 or 4 in the first slot:


How to put the hat in the first slot? Of course in 4 ways. Now how can be placed in the 2nd slot? We have put a cap in the previous one, so we can put it in the 2nd slot in 4-1=3 way. Similarly 2 ways in 3rd slot and 1 way in 2nd slot. So total ways are 4×3×2×1=24

The What to do if there are n hats in place of 4? We are programmers, so we write a function in a hurry without calculating it again and again. Assume the function is permutation(n). n=0

If can be arranged in 1 way, then:


n > 0

If the first slot can be placed in n ways, then the problem reduces to “How can n−1 hats be placed in n−1 slots?” That is, the problem becomes permutation(n−1). Multiplies with n because the current slot has n

I put it in a way. Then we can write:


Hope that is clear. I have said so much about the simple matter so that the recursion is clear which will be useful for calculating derangement.

Now assume 1,2,3,4 these 4 caps are owned by Shakib, Nasir, Tamim, Rahim respectively. They are very good friends and decided to wear each other’s hat and go to play cricket. No one can read his own hat, then there will be no friendship! Now how can they read the hat?

In the language of mathematics, this is called derangement, the number of permutations in which no one is in its own place.

1, 3, 2, 4 are not de-arrangements because Shakib and Rahim are wearing their respective caps (number 1 and 4)! 2,1,4,3 is a de-arrangement, everyone has his friend’s hat.

We will construct a function d(n)

which is n

How to arrange the hat so that no one gets his own hat out.

First man Shakib has 4-1=3 choices, he can take any hat except number 1. I thought he took Tamim’s hat. Now 2 things can happen:

  1. Next Tamim took Shakib’s cap. Now 4-2 = 2 people left, hats also left exactly 4-2 = 2.

  2. Next time Tamim took the hat of none other than Shakib. Now the remaining people are 4-1=3 people. Since Tamim is not taking Shakib’s cap, he has to grab his banned cap, and everyone else’s banned cap is his own. So now there are 4-1=3 choices for 4-1=3 people. notice

In both cases, the number of people and hats remains the same. By replacing 4 with n and combining the 2 conditions, we can easily write the recursive relation:


Base case: d(1)=0,d(2)=1

While coding this recursion, keep in mind that the same function is being called many times, so the values must be saved in the DP table. You can read about dynamic programming to know about it.

Now let’s solve the problem in another interesting way. nCr

Or as you are familiar with (nr), (nr) expresses how many r things can be taken from n things. A total of n hats can be arranged n! the way Derangement is obtained by eliminating permutations in which at least one hat is in place. 1 hat can be taken out of n hats in (n1) ways, leaving 1 hat in its place to arrange the remaining n−1 hats (n−1)! by way of Then n!−(n1)×(n−1)! Derangement is not going to get out? Because we are excluding from the total means those permutations that have at least 1 person in their place. Multiplying by (n1) because every time 1 is fixed n−1

Let’s do permutation.

But there is a big problem here. Suppose you keep Tamim’s hat next to Tamim and figure out how to arrange the rest of the hats. If you find out how many ways the rest can be arranged by keeping Shakib’s with Shakib again. Think carefully and see if the permutations in which Shakib is with Shakib and Tamim is with Tamim are not counted twice? (n1)×(n−1)!

Because of this, some permutations will be calculated more than once. How do we eliminate them? When we count 1 fixed number, we exclude those permutations in which 2 fixed numbers are multiplied multiple times. (n1)×(n−1)! Let’s subtract from (n2)×(n−2)! . If you think about it, you will understand that there is a problem here too, where the 3 are fixed, we are also excluding them!! Then add it back.

Plant Website Template – Nursery Website Design Free Download – Gardenia Website Templates

To find the common area of the 3 segments in the Vann diagram, we add all the segments, then subtract the segments that are in two circles, add those that are in the 3 circles again, if the circle is more, the addition and subtraction continues like this. If two sets A,B then |A∪B|=|A|+|B|−|A∩B|

. This is exactly what I will do here. Our formula will be:

n!−(n1)×(n−1)!+(n2)×(n−2)!−..…+(−1)k×(nk)×(n−k)!+….+( −1)n

We are adding once, and subtracting once, thus getting the result by eliminating the unnecessary part. The official name of this thing is the inclusion-exclusion principle.

So far today.

Plant Website Template – Nursery Website Design Free Download – Gardenia Website Templates

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,

Stay with

Share the post if necessary.

Before Download

You must Join our Facebook Group and Subscribe YouTube Channel tries to provide HTML, CSS, SCSS, JavaScript, React, Android Studio, Java, PHP, Laravel, Python, Django, C#(C Sharp), and projects 100% free. We try to make learning easier. Free Website Create always tries to give free projects to new learners. Free projects and source code will help to learn quickly.

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.

To get a free website project code,

Keep bookmarking our website, Save categories links, Follow Social Media, Follow the youtube channel Join Facebook groups.

Stay with

Share the post if necessary.

Leave a Comment