Problem 51820. Count unique orderings of vertices of a polygon
Cody Problem 2671 asks us to determine whether four points can be the corners of a rectangle. The points are not necessarily input in order (either clockwise or counterclockwise). My initial attempt at the problem involved determining how the points might be presented. If the corners are numbered as shown below, then they can be input in 24 ways.
However, for the rectangle problem, many of the 24 ways are essentially the same. For example, 2341, 3214, and 4123 are effectively the same as 1234 because the numbers of the corners could be shifted around the rectangle. In fact, only three of the 24 ways are different (1234, 1243, and 1324).
Write a function to determine the unique orderings of vertices of a polygon with n sides.
Solution Stats
Problem Comments
Solution Comments
Show commentsGroup

Sequences & Series V
- 16 Problems
- 5 Finishers
- Solve a nonlinear difference equation
- Iterate the sum of divisors and totient
- Sum the elements in rows of the Levine triangle
- Find the smallest integer m such that n divides m!
- Identify Ruth-Aaron numbers
- Find numbers in the Popular Computing Z-sequence
- Find the nth nude number
- Determine whether a number is a fibodiv number
- List modest numbers up to n
- List the vile numbers
- List the dopey numbers
- Compute the Sequence of the Day
- Classify product/digit-sum sequences
- Count unique orderings of vertices of a polygon
- Count the ways to draw non-intersecting chords between points on a circle
- Fill a rectangle with 1x1 and 2x2 tiles
Problem Recent Solvers18
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!