Mathematics memorandum to keep up with the field # 3

Meeting again this time

Part 3 will be a permutation and combination of sets. Is it useful when making a matrix in terms of programs?

Number of cases

When you roll the dice, there are 6 different numbers of rolls, and when you flip a coin toss, the number of front and back rolls is There are two ways, like this, the number that can occur is called __the number of cases __.

Here's how to find the number of cases. --Rule of product (If each probability can occur at the same time, it is calculated by multiplication) --Rule of sum (If each probability can occur independently, it is calculated by addition)

permutation

How many patterns of 3-digit numbers are there using natural numbers from 1 to 5? However, the same number is in one combination Do not enter. Such a problem can be solved as follows.

  1. There are 5 numbers in the 100s
  2. There are 4 numbers in the 10s (because the numbers used in the 100s cannot be used)
  3. There are 3 numbers in the 10th place 5 * 4 * 3 = 60 because it can happen at the same time __ There are 60 answers __ It will be. Arranging in consideration of the order is called __permutation __ in the world of mathematics, and can be expressed as follows.

__ Permutation = nPr__

In the upper example, n is 5 and r is 3.

Recommended Posts

Mathematics memorandum to keep up with the field # 4
Mathematics memorandum to keep up with the field # 3
Memorandum (Add name only to people with the same surname in the list)
[Python] Round up with just the operator
[Django] I made a field to enter the date with 4 digit numbers
Match the colorbar to the figure with matplotlib
The road to compiling to Python 3 with Thrift
Try to use up the Raspberry Pi 2's 4-core CPU with Parallel Python
Try to solve the fizzbuzz problem with Keras
Log in to the remote server with SSH
A memorandum to make WebDAV only with nginx
The easiest way to get started with Django
Crop the image to rounded corners with pythonista
How to specify the NIC to scan with amazon-dash
2016 The University of Tokyo Mathematics Solved with Python
I tried to save the data with discord
The easiest way to synthesize speech with python
Try to solve the man-machine chart with Python
Specify the Python executable to use with virtualenv
I wanted to play with the Bezier curve
How to try the friends-of-friends algorithm with pyfof
Say hello to the world with Python with IntelliJ
The easiest way to use OpenCV with python
Save the object to a file with pickle
Back up from QNAP to Linux with rsync
How to Learn Kaldi with the JUST Corpus
I tried to learn the sin function with chainer
The easiest way to set up Last-Modified in Flask
How to delete the specified string with the sed command! !! !!
Add information to the bottom of the figure with Matplotlib
Just add the driver to the shape key with blender
[Introduction to Python] How to iterate with the range function?
How to create a submenu with the [Blender] plugin
Try to visualize the room with Raspberry Pi, part 1
Try to solve the internship assignment problem with Python
I tried to touch the CSV file with Python
I tried to solve the soma cube with python
[Python] How to specify the download location with youtube-dl
Display the integrated temperature for each field with Z-GIS
Introduction to Mathematics Starting with Python Study Memo Vol.1
I want to inherit to the back with python dataclass
Try to get the contents of Word with Golang
[Neo4J] ④ Try to handle the graph structure with Cypher
PyInstaller memorandum Convert Python [.py] to [.exe] with 2 lines
Specify MinGW as the compiler to use with Python
Transit to the update screen with the Django a tag
I tried to solve the problem with Python Vol.1
[Python] How to rewrite the table style with python-pptx [python-pptx]
Display / update the graph according to the input with PySimpleGui
Try to specify the axis with PyTorch's Softmax function
I wrote you to watch the signal with Go