There are 10 letters in the word PROPORTION, namely OOO, PP, RR, I, T and N.
(b) The four-letter word may consists of
(i) 3 alike letters and 1 distinct letter
(ii) 2 alike letters of one kind and 2 alike letters of the second kind
(iii) 2 alike letters and 2 distinct letters
(iv) all distinct letters
Now, we shall discuss these four cases one by one.
(i) 3 alike letters and 1 distinct letter:
There is one set of three
alike letters, OOO, which can be selected in one way.
Out of the 5 different letters, P, R, I, T and N, one can be selected in \[{}^5 C_1\] ways.
These four letters can be arranged in \[\frac{4!}{3! 1!}\]ways.
∴ Total number of ways = \[{}^5 C_1 \times \frac{4!}{3! 1!} = 20\]
(ii) There are 3 sets of two alike letters, which can be selected in 3C2 ways.
Now, the letters of each group can be arranged in\[\frac{4!}{2! 2!}\]ways.
∴
Total number of ways =\[{}^3 C_2 \times \frac{4!}{2! 2!} = 18\]
(iii) There are three sets of two alike letters, which can be selected in 3C1 ways.
Now, from the remaining 5 letters, 2 letters can be chosen in 5C2 ways.
Thus, 2 alike letters and 2 different letters can be selected in 3C1 x 5C2 = 30 ways.
Now, the letters of each group can be arranged in
\[\frac{4!}{2!}\]ways.
∴
Total number of ways = \[30 \times \frac{4!}{2!} = 360\]
(iv) There are 6 different letters.
So, the number of ways of selecting 4 letters is 6C4 = 15 and these letters can be arranged in 4! ways.
∴ Total number of ways = 15 x 4! = 360
∴ Total number of ways = 20 + 18 + 360 + 360 = 758
In how many ways can the letter of the word PROPORTION be arranged by taking 4 letters at a time? Solution: below I've wrote letters without repeated words and then how many times particular word repeated from the question here we gonna select 4 words hence we have the following chance to select those 4 words Chance 1: 3 O and remaining 1 are different (That means (O,O,O)--> 3 word and
(P,R,T,I,N) ---> 1 word from the 5) Chance 2: two of same words and other two of the same words (here (O,O,O), (T,T) and (P,P) out of 3 pairs we gonna select 2 pair of words ) Chance 3: Two of same words and other two are different words (here (O,O,O), (T,T) and (P,P) out of 3 pairs we gonna select 1 pair of word and other 2 word from (R, O, I, N, T) words consider P,P has been selected pair ) Chance 4: All 4 are different (
here P, R, O, T, I , N out of 6 we gonna select 4 words) Hence finally add all the chances = 20 + 18 + 360 + 360 = 758 ways is the answer Problem Solving : Permutation and combination Problem 1 : In how many ways can the letter of the word PROPORTION be arranged by taking 4 letters at a time?
P R O P O R T I O N
P R O T I N
P R O
O
Here (P, P) 2 P, (R, R) 2 R, and (O,O,O) 3 O
Chance 1: 3C3 * 5C1 * (4! /3!) = 20 [3! for repeated words O,O,O]
Chance 2: 3C2 * (4! / (2!*2!)) = 18 [2! * 2! for repeated words of T,T and P,P]
Chance 3: 3C1*5C2 * (4! / 2!) = 360 [2! for repeated word T,T or P,P]
Chance 4: 6C4 * 4! = 360 [as usual]
Popular posts from this blog
How to Hide Gridview and Show the selected gridview row details in Form View using ASP.NET C#
In this post I'm going to post details about how to hide full Gridview by selecting individual gridview row and show that gridview row details in Formview; In this example, I'm using AdventureWorks Database and datebase table name HumanResources.Employee Click here to Download AdventureWorks Database Here I'll post the code and snapshot details 1. Design View Add connection string code in web.config as below : <connectionstrings> <add name="connection" connectionString="Data Source=localhost\sqlexpress;Initial Catalog=AdventureWorks;Integrated Security=true;" providerName="System.Data.SqlClient"/> </connectionStrings> 2.Design View's Source code in Default.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 T
Jsp / Java Password Encrypt and Decrypt Example
From Previous post Now in this post I will use Encryption/ Decryption mechanism on password input password field using AES algorithm , I am just adding UtilsSecure. java class and it has two methods; 1. Encrypt Method encrypt(String strToEncrypt) to encrypt the user given password to cipher text 2. Decrypt Method decrypt(String strToDecrypt) to decrypt the ciper text back to original password content. Below code shows UtilsSecure.java class file package com.ajax.example; import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; import org.apache.commons.cli.PosixParser; import org.apache.commons.codec.binary.Base64; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class UtilsSecure { static Log lo
How to use Multi-Select Dropdown List in html select input using Jquery in JSP page with limited selections ?
Below Code Snippet shows Selecting Multiple Values $(document).ready(function() { $("#multiselect").dropdownchecklist( { onItemClick: function(checkbox, selector){ var justChecked = checkbox.prop("checked"); var checkCount = (justChecked) ? 1 : -1; for( i = 0; i < selector.options.length; i++ ){ if ( selector.options[i].selected ) checkCount += 1; } if ( checkCount > 3 ) { alert( "Limit is 3 fruits to choose" ); throw "too many"; } },width: 250 }); }); Below code index.jsp page with jquery javascript, css, Ui, codes are imported <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "//www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="