Answer to Question #283949 in MatLAB for Harsh chavda

Question #283949

QI. Find the number n of distinct permutations that can be formed from all the letters of each word: (a) THOSE (b) UNUSUAL (c) SOCIOLOGICAL

1
Expert's answer
2022-01-02T02:24:14-0500
close all,
clear all,
clc,


%Find the number n of distinct permutations that can be formed from all the letters of each word: (a) THOSE (b) UNUSUAL (c) SOCIOLOGICAL
v = 'THOSE';
P = perms(unique(v));
fprintf('\n\tNo. of permutations of word %s = %d',v,length(P));


v = 'UNUSUAL';
P = perms(unique(v));
fprintf('\n\tNo. of permutations of word %s = %d',v,length(P));


v = 'SOCIOLOGICAL';
P = perms(unique(v));
fprintf('\n\tNo. of permutations of word %s = %d',v,length(P));



Results:

No. of permutations of word THOSE = 120

No. of permutations of word UNUSUAL = 120

No. of permutations of word SOCIOLOGICAL = 5040



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS