【问题标题】:How Many Ways are There to Order the Letters of a Word using google sheets有多少种方法可以使用谷歌表格来排序单词的字母
【发布时间】:2022-10-15 22:24:35
【问题描述】:

确定排列字母的不同方式的数量对于每个A1:A18 范围内的单词。

Input Desired Output
arrangement 2494800
sequence 6720
succession 302400
organization 29937600
disposition 1663200
structure 45360
system 360
series 180
grouping 20160
classification 1816214400
categorization 5448643200
codification 19958400
systematization 27243216000
disposal 20160
form 24
layout 720
array 30

例如单词排列

                   n!
nPr =      -------------------
           (n1! n2! . . . nr!)
                   11!
nPr =    ----------------------- 
         (2! 2! 2! 1! 2! 1! 1! )
    1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10 x 11
=  ---------------------------------------------
   {(1 x 2) (1 x 2) (1 x 2) (1) (1 x 2) (1) (1)}
nPr of word ARRANGEMENT = 2494800

【问题讨论】:

    标签: google-sheets lambda google-sheets-formula fact byrow


    【解决方案1】:

    使用这个公式:

    =ArrayFormula(BYROW(A2:A18, LAMBDA(rw,
     LAMBDA(v,
     FACT(LEN(v))/
     PRODUCT(BYROW(
     LAMBDA(s, COUNTIF(s,"="&UNIQUE(TRANSPOSE(s))))
     (Iferror(split(regexreplace(v,"(.)","$1​"),"​"),"")), LAMBDA(rg, FACT(rg)))))(rw))))
    

    简化如下:

    factorial of (Length of the (Range)) / Product of factorial of each sum of unique letter count 
    

    使用的公式帮助
    ARRAYFORMULA - BYROW - LAMBDA - FACT - LEN - PRODUCT - COUNTIF - UNIQUE - TRANSPOSE - @9876543332@ - IFERROR - @98765434

    【讨论】:

      猜你喜欢
      • 2020-06-20
      • 2017-03-19
      • 1970-01-01
      • 2016-01-23
      • 2011-05-21
      • 1970-01-01
      • 1970-01-01
      • 2020-06-30
      • 2011-09-20
      相关资源
      最近更新 更多