SlideShare a Scribd company logo
1 of 21
Out of intense complexities,
intense simplicities emerge;
Linear Formulation of Square Peg Problem Test
Function
Sing Kuang Tan
singkuangtan@gmail.com
29 May 2022
Recap
• Square Peg Problem (Inscribed Square Problem) Definition
• Does every plane simple closed curve contain all four vertices of some
square?
• An example of a closed curve with 3 squares are shown bottom
Test function
p1
p2
p3
p4
A test function f() maps to a 1 if 4 points form a square
Specifically
𝑓 𝑝1, 𝑝2, 𝑝3, 𝑝4 =
1 𝑖𝑓 4 𝑝𝑜𝑖𝑛𝑡𝑠 𝑓𝑜𝑟𝑚 𝑎 𝑠𝑞𝑢𝑎𝑟𝑒
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
p1
p2
p3
p4
A test function f() maps to a 1 if 4 points form a square
Specifically
𝑓 𝑝1, 𝑝2, 𝑝3, 𝑝4 =
1 𝑖𝑓 4 𝑝𝑜𝑖𝑛𝑡𝑠 𝑓𝑜𝑟𝑚 𝑎 𝑠𝑞𝑢𝑎𝑟𝑒
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
f(p1,p2,p3,p4)=1 if
𝑝1 − 𝑝2 = 𝑝2 − 𝑝4 = 𝑝3 − 𝑝4 = 𝑝1 − 𝑝3
And 𝑝1 − 𝑝4 = 𝑝2 − 𝑝3
p1
p2
p3
p4
A test function f() maps to a 1 if 4 points form a square
Specifically
𝑓 𝑝1, 𝑝2, 𝑝3, 𝑝4 =
1 𝑖𝑓 4 𝑝𝑜𝑖𝑛𝑡𝑠 𝑓𝑜𝑟𝑚 𝑎 𝑠𝑞𝑢𝑎𝑟𝑒
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
f(p1,p2,p3,p4)=1 if
𝑝1 − 𝑝2 = 𝑝2 − 𝑝4 = 𝑝3 − 𝑝4 = 𝑝1 − 𝑝3
And 𝑝1 − 𝑝4 = 𝑝2 − 𝑝3
The lengths of the sides of the square are the same
p1
p2
p3
p4
A test function f() maps to a 1 if 4 points form a square
Specifically
𝑓 𝑝1, 𝑝2, 𝑝3, 𝑝4 =
1 𝑖𝑓 4 𝑝𝑜𝑖𝑛𝑡𝑠 𝑓𝑜𝑟𝑚 𝑎 𝑠𝑞𝑢𝑎𝑟𝑒
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
f(p1,p2,p3,p4)=1 if
𝑝1 − 𝑝2 = 𝑝2 − 𝑝4 = 𝑝3 − 𝑝4 = 𝑝1 − 𝑝3
And 𝑝1 − 𝑝4 = 𝑝2 − 𝑝3
The lengths of the diagonals of the square are the same
p1
p2
p3
p4
A test function f() maps to a 1 if 4 points form a square
Specifically
𝑓 𝑝1, 𝑝2, 𝑝3, 𝑝4 =
1 𝑖𝑓 4 𝑝𝑜𝑖𝑛𝑡𝑠 𝑓𝑜𝑟𝑚 𝑎 𝑠𝑞𝑢𝑎𝑟𝑒
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
f(p1,p2,p3,p4)=1 if
𝑝1 − 𝑝2 = 𝑝2 − 𝑝4 = 𝑝3 − 𝑝4 = 𝑝1 − 𝑝3
And 𝑝1 − 𝑝4 = 𝑝2 − 𝑝3
This existing test function is complex with too many quadratic operations
My Test Function using Linear Operations
p1=(x1,y1)
p2=(x2,y2)
p3=(x3,y3)
p4=(x4,y4)
A test function f() maps to a 1 if 4 points form a square
Specifically
𝑓 𝑝1, 𝑝2, 𝑝3, 𝑝4 =
1 𝑖𝑓 4 𝑝𝑜𝑖𝑛𝑡𝑠 𝑓𝑜𝑟𝑚 𝑎 𝑠𝑞𝑢𝑎𝑟𝑒
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
f(p1,p2,p3,p4)=1 if
x2-x1=x4-x3
y2-y1=y4-y3
x4-x1=y2-y3
y4-y1=x3-x2
This test function is much simpler with only linear operations
My Test Function using Linear Operations
p1=(x1,y1)
p2=(x2,y2)
p3=(x3,y3)
p4=(x4,y4)
A test function f() maps to a 1 if 4 points form a square
Specifically
𝑓 𝑝1, 𝑝2, 𝑝3, 𝑝4 =
1 𝑖𝑓 4 𝑝𝑜𝑖𝑛𝑡𝑠 𝑓𝑜𝑟𝑚 𝑎 𝑠𝑞𝑢𝑎𝑟𝑒
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
f(p1,p2,p3,p4)=1 if
x2-x1=x4-x3
y2-y1=y4-y3
x4-x1=y2-y3
y4-y1=x3-x2
This test function is much simpler with only linear operations
The gradient of the top and bottom sides are the same
My Test Function using Linear Operations
p1=(x1,y1)
p2=(x2,y2)
p3=(x3,y3)
p4=(x4,y4)
A test function f() maps to a 1 if 4 points form a square
Specifically
𝑓 𝑝1, 𝑝2, 𝑝3, 𝑝4 =
1 𝑖𝑓 4 𝑝𝑜𝑖𝑛𝑡𝑠 𝑓𝑜𝑟𝑚 𝑎 𝑠𝑞𝑢𝑎𝑟𝑒
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
f(p1,p2,p3,p4)=1 if
x2-x1=x4-x3
y2-y1=y4-y3
x4-x1=y2-y3
y4-y1=x3-x2
This test function is much simpler with only linear operations
The vectors of the diagonals are rotated by right angle
Example
• Parametric equation of shape
• x=cos(t)
• y=2sin(t)
• Find the inscribed square in the shape
• Hint: let cos(t)=2sin(t)
• cos(t)=2sin(t)
• t=0.46364
• Or t=0.46364+pi=3.60523
• cos(t)=-2sin(t)
• t=-0.46364
• Or t=-0.46364+pi=2.67795
• t2=0.46364
• t3=3.60523
• t1=2.67795
• t4=-0.46364
• Put t1,t2,t3,t4 back into the linear equations
• x2-x1=x4-x3
• y2-y1=y4-y3
• x4-x1=y2-y3
• y4-y1=x3-x2
• Put t1,t2,t3,t4 back into the linear equations
• x2-x1=x4-x3
• y2-y1=y4-y3
• x4-x1=y2-y3
• y4-y1=x3-x2
• becomes
• cos(t2)-cos(t1)=cos(t4)-cos(t3)
• 2sin(t2)-2sin(t1)=2sin(t4)-2sin(t3)
• cos(t4)-cos(t1)=2sin(t2)-2sin(t3)
• 2sin(t4)-2sin(t1)=cos(t3)-cos(t2)
• The equations
• cos(t2)-cos(t1)=cos(t4)-cos(t3)
• 2sin(t2)-2sin(t1)=2sin(t4)-2sin(t3)
• cos(t4)-cos(t1)=2sin(t2)-2sin(t3)
• 2sin(t4)-2sin(t1)=cos(t3)-cos(t2)
• are all satisfied
• Therefore these t1,t2,t3,t4 are points of inscribed square
t1 t2
t3 t4
Why I study test function for square peg
problem?
• Study pure mathematics to invent new algorithms
• Most physical objects are moving along curves that are sum of
sinusoidal waves
• Can be represented by curve and constraints in Square Peg Problem
I’ll be back
• I will come back and explain how to find the inscribed
squares of curves of more complex parametric equations
and complex Fourier series
• Examples of curves
Links to my papers
● https://vixra.org/author/sing_kuang_tan
● Link to my NP vs P paper
● Discrete Markov Random Field relaxation paper
● Linear Formulation of Square Peg Problem Test Function
About Me
●My job uses Machine Learning to solve problems
○Like my posts or slides in LinkedIn, Twitter or Slideshare
○Follow me on LinkedIn
■ https://www.linkedin.com/in/sing-kuang-tan-b189279/
○Follow me on Twitter
■ https://twitter.com/Tan_Sing_Kuang
○Send me comments through these links
●Look at my Slideshare slides
○https://www.slideshare.net/SingKuangTan
○https://slideplayer.com/user/21705658/
■ Don’t Be a Square Man; Visual Proof for Square Peg Problem with Convex Shapes
■ Visual Proofs for Topology
■ Implement Data Structure Fast with Python
■ Discrete Markov Random Field Relaxation
■ NP vs P Proof using Discrete Finite Automata
■ Use Inductive or Deductive Logic to solve NP vs P?
■ Kung Fu Computer Science, Clique Problem: Step by Step
■ Beyond Shannon, Sipser and Razborov; Solve Clique Problem like an Electronic Engineer
■ A weird Soviet method to partially solve the Perebor Problems
■ 8 trends in Hang Seng Index
■ 4 types of Mathematical Proofs
■ How I prove NP vs P
○Follow me on Slideshare
Share my links
● I am a Small Person with Big Dreams
○ Please help me to repost my links to other platforms so that I can spread my ideas to the rest of the world
● 我人小,但因梦想而伟大。
○ 请帮我的文件链接传发到其他平台,让我的思想能传遍天下。
● Comments? Send to singkuangtan@gmail.com
● Link to my paper NP vs P paper
○ https://www.slideshare.net/SingKuangTan/brief-np-vspexplain-249524831
○ Prove Np not equal P using Markov Random Field and Boolean Algebra Simplification
○ https://vixra.org/abs/2105.0181
○ Other link
■ https://www.slideshare.net/SingKuangTan

More Related Content

Similar to Linear Formulation Square Peg Test

Unit-1 Basic Concept of Algorithm.pptx
Unit-1 Basic Concept of Algorithm.pptxUnit-1 Basic Concept of Algorithm.pptx
Unit-1 Basic Concept of Algorithm.pptxssuser01e301
 
Composite Functions.pptx
Composite Functions.pptxComposite Functions.pptx
Composite Functions.pptxNadineThomas4
 
Grade 10_Math-Lesson 2-3 Graphs of Polynomial Functions .pptx
Grade 10_Math-Lesson 2-3 Graphs of Polynomial Functions .pptxGrade 10_Math-Lesson 2-3 Graphs of Polynomial Functions .pptx
Grade 10_Math-Lesson 2-3 Graphs of Polynomial Functions .pptxErlenaMirador1
 
Grade 10_Math-Lesson 2-3 Graphs of Polynomial Functions .pptx
Grade 10_Math-Lesson 2-3 Graphs of Polynomial Functions .pptxGrade 10_Math-Lesson 2-3 Graphs of Polynomial Functions .pptx
Grade 10_Math-Lesson 2-3 Graphs of Polynomial Functions .pptxErlenaMirador1
 
WEEK 1 QUADRATIC EQUATION.pptx
WEEK 1 QUADRATIC EQUATION.pptxWEEK 1 QUADRATIC EQUATION.pptx
WEEK 1 QUADRATIC EQUATION.pptxJOANNAMARIECAOILE
 
Quadratic Functions.pptx
Quadratic Functions.pptxQuadratic Functions.pptx
Quadratic Functions.pptxgcasaclang18
 
Are-you-Ready-For-Calculus-w-Analytic-Geometry-Mth-173.pptx
Are-you-Ready-For-Calculus-w-Analytic-Geometry-Mth-173.pptxAre-you-Ready-For-Calculus-w-Analytic-Geometry-Mth-173.pptx
Are-you-Ready-For-Calculus-w-Analytic-Geometry-Mth-173.pptxShehzadAhmed90
 
Discrete Math IP4 - Automata Theory
Discrete Math IP4 - Automata TheoryDiscrete Math IP4 - Automata Theory
Discrete Math IP4 - Automata TheoryMark Simon
 
Efficient Hill Climber for Multi-Objective Pseudo-Boolean Optimization
Efficient Hill Climber for Multi-Objective Pseudo-Boolean OptimizationEfficient Hill Climber for Multi-Objective Pseudo-Boolean Optimization
Efficient Hill Climber for Multi-Objective Pseudo-Boolean Optimizationjfrchicanog
 
function power point presentation for class 11 and 12 for jee
function power point presentation for class 11 and 12 for jeefunction power point presentation for class 11 and 12 for jee
function power point presentation for class 11 and 12 for jeeMohanSonawane
 
1 lesson 6 introduction to radical functions
1 lesson 6 introduction to radical functions1 lesson 6 introduction to radical functions
1 lesson 6 introduction to radical functionsMelchor Cachuela
 
1 lesson 6 introduction to radical functions
1 lesson 6 introduction to radical functions1 lesson 6 introduction to radical functions
1 lesson 6 introduction to radical functionsMelchor Cachuela
 
January 20, 2015
January 20, 2015January 20, 2015
January 20, 2015khyps13
 
Patterns, sequences and series
Patterns, sequences and seriesPatterns, sequences and series
Patterns, sequences and seriesVukile Xhego
 
My finale MAD. Antonette
My finale MAD. AntonetteMy finale MAD. Antonette
My finale MAD. Antonette09102565143
 
Chapter 3 linear equations
Chapter 3 linear equationsChapter 3 linear equations
Chapter 3 linear equationsChandran Chan
 
Direct solution of sparse network equations by optimally ordered triangular f...
Direct solution of sparse network equations by optimally ordered triangular f...Direct solution of sparse network equations by optimally ordered triangular f...
Direct solution of sparse network equations by optimally ordered triangular f...Dimas Ruliandi
 

Similar to Linear Formulation Square Peg Test (20)

Unit-1 Basic Concept of Algorithm.pptx
Unit-1 Basic Concept of Algorithm.pptxUnit-1 Basic Concept of Algorithm.pptx
Unit-1 Basic Concept of Algorithm.pptx
 
Composite Functions.pptx
Composite Functions.pptxComposite Functions.pptx
Composite Functions.pptx
 
Grade 10_Math-Lesson 2-3 Graphs of Polynomial Functions .pptx
Grade 10_Math-Lesson 2-3 Graphs of Polynomial Functions .pptxGrade 10_Math-Lesson 2-3 Graphs of Polynomial Functions .pptx
Grade 10_Math-Lesson 2-3 Graphs of Polynomial Functions .pptx
 
Grade 10_Math-Lesson 2-3 Graphs of Polynomial Functions .pptx
Grade 10_Math-Lesson 2-3 Graphs of Polynomial Functions .pptxGrade 10_Math-Lesson 2-3 Graphs of Polynomial Functions .pptx
Grade 10_Math-Lesson 2-3 Graphs of Polynomial Functions .pptx
 
Parabola complete
Parabola completeParabola complete
Parabola complete
 
WEEK 1 QUADRATIC EQUATION.pptx
WEEK 1 QUADRATIC EQUATION.pptxWEEK 1 QUADRATIC EQUATION.pptx
WEEK 1 QUADRATIC EQUATION.pptx
 
Quadratic Functions.pptx
Quadratic Functions.pptxQuadratic Functions.pptx
Quadratic Functions.pptx
 
Are-you-Ready-For-Calculus-w-Analytic-Geometry-Mth-173.pptx
Are-you-Ready-For-Calculus-w-Analytic-Geometry-Mth-173.pptxAre-you-Ready-For-Calculus-w-Analytic-Geometry-Mth-173.pptx
Are-you-Ready-For-Calculus-w-Analytic-Geometry-Mth-173.pptx
 
Gcse Maths Resources
Gcse Maths ResourcesGcse Maths Resources
Gcse Maths Resources
 
Discrete Math IP4 - Automata Theory
Discrete Math IP4 - Automata TheoryDiscrete Math IP4 - Automata Theory
Discrete Math IP4 - Automata Theory
 
Efficient Hill Climber for Multi-Objective Pseudo-Boolean Optimization
Efficient Hill Climber for Multi-Objective Pseudo-Boolean OptimizationEfficient Hill Climber for Multi-Objective Pseudo-Boolean Optimization
Efficient Hill Climber for Multi-Objective Pseudo-Boolean Optimization
 
function power point presentation for class 11 and 12 for jee
function power point presentation for class 11 and 12 for jeefunction power point presentation for class 11 and 12 for jee
function power point presentation for class 11 and 12 for jee
 
1 lesson 6 introduction to radical functions
1 lesson 6 introduction to radical functions1 lesson 6 introduction to radical functions
1 lesson 6 introduction to radical functions
 
1 lesson 6 introduction to radical functions
1 lesson 6 introduction to radical functions1 lesson 6 introduction to radical functions
1 lesson 6 introduction to radical functions
 
Differential equations
Differential equationsDifferential equations
Differential equations
 
January 20, 2015
January 20, 2015January 20, 2015
January 20, 2015
 
Patterns, sequences and series
Patterns, sequences and seriesPatterns, sequences and series
Patterns, sequences and series
 
My finale MAD. Antonette
My finale MAD. AntonetteMy finale MAD. Antonette
My finale MAD. Antonette
 
Chapter 3 linear equations
Chapter 3 linear equationsChapter 3 linear equations
Chapter 3 linear equations
 
Direct solution of sparse network equations by optimally ordered triangular f...
Direct solution of sparse network equations by optimally ordered triangular f...Direct solution of sparse network equations by optimally ordered triangular f...
Direct solution of sparse network equations by optimally ordered triangular f...
 

More from Sing Kuang Tan

neuron_never_overfits.pptx
neuron_never_overfits.pptxneuron_never_overfits.pptx
neuron_never_overfits.pptxSing Kuang Tan
 
Convex Square Peg Problem
Convex Square Peg ProblemConvex Square Peg Problem
Convex Square Peg ProblemSing Kuang Tan
 
Implement Data Structures with Python Fast using Sparse Matrix
Implement Data Structures with Python Fast using Sparse MatrixImplement Data Structures with Python Fast using Sparse Matrix
Implement Data Structures with Python Fast using Sparse MatrixSing Kuang Tan
 
Discrete Markov Random Field Relaxation
Discrete Markov Random Field RelaxationDiscrete Markov Random Field Relaxation
Discrete Markov Random Field RelaxationSing Kuang Tan
 
NP vs P Proof using Deterministic Finite Automata
NP vs P Proof using Deterministic Finite AutomataNP vs P Proof using Deterministic Finite Automata
NP vs P Proof using Deterministic Finite AutomataSing Kuang Tan
 
Use Inductive or Deductive Logic to solve NP vs P?
Use Inductive or Deductive Logic to solve NP vs P?Use Inductive or Deductive Logic to solve NP vs P?
Use Inductive or Deductive Logic to solve NP vs P?Sing Kuang Tan
 
Clique problem step_by_step
Clique problem step_by_stepClique problem step_by_step
Clique problem step_by_stepSing Kuang Tan
 
Beyond Shannon, Sipser and Razborov; Solve Clique Problem like an Electronic ...
Beyond Shannon, Sipser and Razborov; Solve Clique Problem like an Electronic ...Beyond Shannon, Sipser and Razborov; Solve Clique Problem like an Electronic ...
Beyond Shannon, Sipser and Razborov; Solve Clique Problem like an Electronic ...Sing Kuang Tan
 
A Weird Soviet Method to Partially Solve the Perebor Problem
A Weird Soviet Method to Partially Solve the Perebor ProblemA Weird Soviet Method to Partially Solve the Perebor Problem
A Weird Soviet Method to Partially Solve the Perebor ProblemSing Kuang Tan
 
NP vs P 的简要说明。 使用马尔可夫随机场和布尔代数简化证明 Np 不等于 P
NP vs P 的简要说明。 使用马尔可夫随机场和布尔代数简化证明 Np 不等于 PNP vs P 的简要说明。 使用马尔可夫随机场和布尔代数简化证明 Np 不等于 P
NP vs P 的简要说明。 使用马尔可夫随机场和布尔代数简化证明 Np 不等于 PSing Kuang Tan
 
Hang Seng Index 8 trends
Hang Seng Index 8 trendsHang Seng Index 8 trends
Hang Seng Index 8 trendsSing Kuang Tan
 
Mathematical Proof types
Mathematical Proof typesMathematical Proof types
Mathematical Proof typesSing Kuang Tan
 
Brief explanation of NP vs P. Prove Np not equal P using Markov Random Field ...
Brief explanation of NP vs P. Prove Np not equal P using Markov Random Field ...Brief explanation of NP vs P. Prove Np not equal P using Markov Random Field ...
Brief explanation of NP vs P. Prove Np not equal P using Markov Random Field ...Sing Kuang Tan
 

More from Sing Kuang Tan (14)

neuron_never_overfits.pptx
neuron_never_overfits.pptxneuron_never_overfits.pptx
neuron_never_overfits.pptx
 
Convex Square Peg Problem
Convex Square Peg ProblemConvex Square Peg Problem
Convex Square Peg Problem
 
Visual topology
Visual topologyVisual topology
Visual topology
 
Implement Data Structures with Python Fast using Sparse Matrix
Implement Data Structures with Python Fast using Sparse MatrixImplement Data Structures with Python Fast using Sparse Matrix
Implement Data Structures with Python Fast using Sparse Matrix
 
Discrete Markov Random Field Relaxation
Discrete Markov Random Field RelaxationDiscrete Markov Random Field Relaxation
Discrete Markov Random Field Relaxation
 
NP vs P Proof using Deterministic Finite Automata
NP vs P Proof using Deterministic Finite AutomataNP vs P Proof using Deterministic Finite Automata
NP vs P Proof using Deterministic Finite Automata
 
Use Inductive or Deductive Logic to solve NP vs P?
Use Inductive or Deductive Logic to solve NP vs P?Use Inductive or Deductive Logic to solve NP vs P?
Use Inductive or Deductive Logic to solve NP vs P?
 
Clique problem step_by_step
Clique problem step_by_stepClique problem step_by_step
Clique problem step_by_step
 
Beyond Shannon, Sipser and Razborov; Solve Clique Problem like an Electronic ...
Beyond Shannon, Sipser and Razborov; Solve Clique Problem like an Electronic ...Beyond Shannon, Sipser and Razborov; Solve Clique Problem like an Electronic ...
Beyond Shannon, Sipser and Razborov; Solve Clique Problem like an Electronic ...
 
A Weird Soviet Method to Partially Solve the Perebor Problem
A Weird Soviet Method to Partially Solve the Perebor ProblemA Weird Soviet Method to Partially Solve the Perebor Problem
A Weird Soviet Method to Partially Solve the Perebor Problem
 
NP vs P 的简要说明。 使用马尔可夫随机场和布尔代数简化证明 Np 不等于 P
NP vs P 的简要说明。 使用马尔可夫随机场和布尔代数简化证明 Np 不等于 PNP vs P 的简要说明。 使用马尔可夫随机场和布尔代数简化证明 Np 不等于 P
NP vs P 的简要说明。 使用马尔可夫随机场和布尔代数简化证明 Np 不等于 P
 
Hang Seng Index 8 trends
Hang Seng Index 8 trendsHang Seng Index 8 trends
Hang Seng Index 8 trends
 
Mathematical Proof types
Mathematical Proof typesMathematical Proof types
Mathematical Proof types
 
Brief explanation of NP vs P. Prove Np not equal P using Markov Random Field ...
Brief explanation of NP vs P. Prove Np not equal P using Markov Random Field ...Brief explanation of NP vs P. Prove Np not equal P using Markov Random Field ...
Brief explanation of NP vs P. Prove Np not equal P using Markov Random Field ...
 

Recently uploaded

SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxkessiyaTpeter
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...jana861314
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...RohitNehra6
 
Analytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfAnalytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfSwapnil Therkar
 
Biological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfBiological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfmuntazimhurra
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Lokesh Kothari
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Nistarini College, Purulia (W.B) India
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PPRINCE C P
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Sérgio Sacani
 
G9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptG9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptMAESTRELLAMesa2
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTSérgio Sacani
 
Luciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptxLuciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptxAleenaTreesaSaji
 
Boyles law module in the grade 10 science
Boyles law module in the grade 10 scienceBoyles law module in the grade 10 science
Boyles law module in the grade 10 sciencefloriejanemacaya1
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptxanandsmhk
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxyaramohamed343013
 
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdfNAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdfWadeK3
 
Work, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE PhysicsWork, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE Physicsvishikhakeshava1
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...Sérgio Sacani
 
zoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzohaibmir069
 

Recently uploaded (20)

SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...
 
Analytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfAnalytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdf
 
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
 
Biological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfBiological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdf
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C P
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
G9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptG9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.ppt
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOST
 
Luciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptxLuciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptx
 
Boyles law module in the grade 10 science
Boyles law module in the grade 10 scienceBoyles law module in the grade 10 science
Boyles law module in the grade 10 science
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docx
 
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdfNAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
 
Work, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE PhysicsWork, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE Physics
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
 
zoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistan
 

Linear Formulation Square Peg Test

  • 1. Out of intense complexities, intense simplicities emerge; Linear Formulation of Square Peg Problem Test Function Sing Kuang Tan singkuangtan@gmail.com 29 May 2022
  • 2. Recap • Square Peg Problem (Inscribed Square Problem) Definition • Does every plane simple closed curve contain all four vertices of some square? • An example of a closed curve with 3 squares are shown bottom
  • 3. Test function p1 p2 p3 p4 A test function f() maps to a 1 if 4 points form a square Specifically 𝑓 𝑝1, 𝑝2, 𝑝3, 𝑝4 = 1 𝑖𝑓 4 𝑝𝑜𝑖𝑛𝑡𝑠 𝑓𝑜𝑟𝑚 𝑎 𝑠𝑞𝑢𝑎𝑟𝑒 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
  • 4. p1 p2 p3 p4 A test function f() maps to a 1 if 4 points form a square Specifically 𝑓 𝑝1, 𝑝2, 𝑝3, 𝑝4 = 1 𝑖𝑓 4 𝑝𝑜𝑖𝑛𝑡𝑠 𝑓𝑜𝑟𝑚 𝑎 𝑠𝑞𝑢𝑎𝑟𝑒 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 f(p1,p2,p3,p4)=1 if 𝑝1 − 𝑝2 = 𝑝2 − 𝑝4 = 𝑝3 − 𝑝4 = 𝑝1 − 𝑝3 And 𝑝1 − 𝑝4 = 𝑝2 − 𝑝3
  • 5. p1 p2 p3 p4 A test function f() maps to a 1 if 4 points form a square Specifically 𝑓 𝑝1, 𝑝2, 𝑝3, 𝑝4 = 1 𝑖𝑓 4 𝑝𝑜𝑖𝑛𝑡𝑠 𝑓𝑜𝑟𝑚 𝑎 𝑠𝑞𝑢𝑎𝑟𝑒 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 f(p1,p2,p3,p4)=1 if 𝑝1 − 𝑝2 = 𝑝2 − 𝑝4 = 𝑝3 − 𝑝4 = 𝑝1 − 𝑝3 And 𝑝1 − 𝑝4 = 𝑝2 − 𝑝3 The lengths of the sides of the square are the same
  • 6. p1 p2 p3 p4 A test function f() maps to a 1 if 4 points form a square Specifically 𝑓 𝑝1, 𝑝2, 𝑝3, 𝑝4 = 1 𝑖𝑓 4 𝑝𝑜𝑖𝑛𝑡𝑠 𝑓𝑜𝑟𝑚 𝑎 𝑠𝑞𝑢𝑎𝑟𝑒 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 f(p1,p2,p3,p4)=1 if 𝑝1 − 𝑝2 = 𝑝2 − 𝑝4 = 𝑝3 − 𝑝4 = 𝑝1 − 𝑝3 And 𝑝1 − 𝑝4 = 𝑝2 − 𝑝3 The lengths of the diagonals of the square are the same
  • 7. p1 p2 p3 p4 A test function f() maps to a 1 if 4 points form a square Specifically 𝑓 𝑝1, 𝑝2, 𝑝3, 𝑝4 = 1 𝑖𝑓 4 𝑝𝑜𝑖𝑛𝑡𝑠 𝑓𝑜𝑟𝑚 𝑎 𝑠𝑞𝑢𝑎𝑟𝑒 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 f(p1,p2,p3,p4)=1 if 𝑝1 − 𝑝2 = 𝑝2 − 𝑝4 = 𝑝3 − 𝑝4 = 𝑝1 − 𝑝3 And 𝑝1 − 𝑝4 = 𝑝2 − 𝑝3 This existing test function is complex with too many quadratic operations
  • 8. My Test Function using Linear Operations p1=(x1,y1) p2=(x2,y2) p3=(x3,y3) p4=(x4,y4) A test function f() maps to a 1 if 4 points form a square Specifically 𝑓 𝑝1, 𝑝2, 𝑝3, 𝑝4 = 1 𝑖𝑓 4 𝑝𝑜𝑖𝑛𝑡𝑠 𝑓𝑜𝑟𝑚 𝑎 𝑠𝑞𝑢𝑎𝑟𝑒 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 f(p1,p2,p3,p4)=1 if x2-x1=x4-x3 y2-y1=y4-y3 x4-x1=y2-y3 y4-y1=x3-x2 This test function is much simpler with only linear operations
  • 9. My Test Function using Linear Operations p1=(x1,y1) p2=(x2,y2) p3=(x3,y3) p4=(x4,y4) A test function f() maps to a 1 if 4 points form a square Specifically 𝑓 𝑝1, 𝑝2, 𝑝3, 𝑝4 = 1 𝑖𝑓 4 𝑝𝑜𝑖𝑛𝑡𝑠 𝑓𝑜𝑟𝑚 𝑎 𝑠𝑞𝑢𝑎𝑟𝑒 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 f(p1,p2,p3,p4)=1 if x2-x1=x4-x3 y2-y1=y4-y3 x4-x1=y2-y3 y4-y1=x3-x2 This test function is much simpler with only linear operations The gradient of the top and bottom sides are the same
  • 10. My Test Function using Linear Operations p1=(x1,y1) p2=(x2,y2) p3=(x3,y3) p4=(x4,y4) A test function f() maps to a 1 if 4 points form a square Specifically 𝑓 𝑝1, 𝑝2, 𝑝3, 𝑝4 = 1 𝑖𝑓 4 𝑝𝑜𝑖𝑛𝑡𝑠 𝑓𝑜𝑟𝑚 𝑎 𝑠𝑞𝑢𝑎𝑟𝑒 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 f(p1,p2,p3,p4)=1 if x2-x1=x4-x3 y2-y1=y4-y3 x4-x1=y2-y3 y4-y1=x3-x2 This test function is much simpler with only linear operations The vectors of the diagonals are rotated by right angle
  • 11. Example • Parametric equation of shape • x=cos(t) • y=2sin(t) • Find the inscribed square in the shape • Hint: let cos(t)=2sin(t)
  • 12. • cos(t)=2sin(t) • t=0.46364 • Or t=0.46364+pi=3.60523 • cos(t)=-2sin(t) • t=-0.46364 • Or t=-0.46364+pi=2.67795
  • 13. • t2=0.46364 • t3=3.60523 • t1=2.67795 • t4=-0.46364 • Put t1,t2,t3,t4 back into the linear equations • x2-x1=x4-x3 • y2-y1=y4-y3 • x4-x1=y2-y3 • y4-y1=x3-x2
  • 14. • Put t1,t2,t3,t4 back into the linear equations • x2-x1=x4-x3 • y2-y1=y4-y3 • x4-x1=y2-y3 • y4-y1=x3-x2 • becomes • cos(t2)-cos(t1)=cos(t4)-cos(t3) • 2sin(t2)-2sin(t1)=2sin(t4)-2sin(t3) • cos(t4)-cos(t1)=2sin(t2)-2sin(t3) • 2sin(t4)-2sin(t1)=cos(t3)-cos(t2)
  • 15. • The equations • cos(t2)-cos(t1)=cos(t4)-cos(t3) • 2sin(t2)-2sin(t1)=2sin(t4)-2sin(t3) • cos(t4)-cos(t1)=2sin(t2)-2sin(t3) • 2sin(t4)-2sin(t1)=cos(t3)-cos(t2) • are all satisfied • Therefore these t1,t2,t3,t4 are points of inscribed square t1 t2 t3 t4
  • 16. Why I study test function for square peg problem? • Study pure mathematics to invent new algorithms • Most physical objects are moving along curves that are sum of sinusoidal waves • Can be represented by curve and constraints in Square Peg Problem
  • 17. I’ll be back • I will come back and explain how to find the inscribed squares of curves of more complex parametric equations and complex Fourier series • Examples of curves
  • 18. Links to my papers ● https://vixra.org/author/sing_kuang_tan ● Link to my NP vs P paper ● Discrete Markov Random Field relaxation paper ● Linear Formulation of Square Peg Problem Test Function
  • 19. About Me ●My job uses Machine Learning to solve problems ○Like my posts or slides in LinkedIn, Twitter or Slideshare ○Follow me on LinkedIn ■ https://www.linkedin.com/in/sing-kuang-tan-b189279/ ○Follow me on Twitter ■ https://twitter.com/Tan_Sing_Kuang ○Send me comments through these links
  • 20. ●Look at my Slideshare slides ○https://www.slideshare.net/SingKuangTan ○https://slideplayer.com/user/21705658/ ■ Don’t Be a Square Man; Visual Proof for Square Peg Problem with Convex Shapes ■ Visual Proofs for Topology ■ Implement Data Structure Fast with Python ■ Discrete Markov Random Field Relaxation ■ NP vs P Proof using Discrete Finite Automata ■ Use Inductive or Deductive Logic to solve NP vs P? ■ Kung Fu Computer Science, Clique Problem: Step by Step ■ Beyond Shannon, Sipser and Razborov; Solve Clique Problem like an Electronic Engineer ■ A weird Soviet method to partially solve the Perebor Problems ■ 8 trends in Hang Seng Index ■ 4 types of Mathematical Proofs ■ How I prove NP vs P ○Follow me on Slideshare
  • 21. Share my links ● I am a Small Person with Big Dreams ○ Please help me to repost my links to other platforms so that I can spread my ideas to the rest of the world ● 我人小,但因梦想而伟大。 ○ 请帮我的文件链接传发到其他平台,让我的思想能传遍天下。 ● Comments? Send to singkuangtan@gmail.com ● Link to my paper NP vs P paper ○ https://www.slideshare.net/SingKuangTan/brief-np-vspexplain-249524831 ○ Prove Np not equal P using Markov Random Field and Boolean Algebra Simplification ○ https://vixra.org/abs/2105.0181 ○ Other link ■ https://www.slideshare.net/SingKuangTan