drawer principle in Combinatorics
Problem 1: Given an array of real number with length (n2 + 1) A:
a1, a2, ... , an2+1.
Prove that there is either an increasing or a decreasing subarray of A with length (n + 1).
Proof:
In order to prove the proposition, we just need to prove that there must be a decreasing subarray of A
with length (n + 1) when there doesn't exist an increasing subarray of A with length (n + 1). Let mi denote
the length of the longest increasing subarray(LIS) beginning with element ai , thus under the assumption above we
have: for all 1 ≤ i ≤n2 + 1, 1 ≤ mi ≤ n. Therefore by drawer principle we have mk1 = mk2 = ... = mk(n+1),(k1 < k2 <... < k(n+1)).
(otherwise we have n2 numbers at most whilst we got n2 + 1).We assert that's the disired decreasing array, otherwise if (ki , kj) :
aki < akj ,we have LIS(mki) ≥ LIS(mkj) + 1, and this results a contradiction.
drawer principle in Combinatorics的更多相关文章
- pigeonhole principle 哈希表的重复问题(冲突)是不可避免的
https://en.wikipedia.org/wiki/Pigeonhole_principle Sock-picking Assume a drawer contains a mixture o ...
- 抄书 Richard P. Stanley Enumerative Combinatorics Chapter 2 Sieve Methods
2.1 Inclusion-Exclusion Roughly speaking, a "sieve method" in enumerative combinatorics is ...
- Atitit.软件开发的几大规则,法则,与原则Principle v3
Atitit.软件开发的几大规则,法则,与原则Principle v31.1. 修改历史22. 设计模式六大原则22.1. 设计模式六大原则(1):单一职责原则22.2. 设计模式六大原则(2):里 ...
- C#设计模式系列:开闭原则(Open Close Principle)
1.开闭原则简介 开闭原则对扩展开放,对修改关闭,开闭原则是面向对象设计中可复用设计的基石. 2.开闭原则的实现 实现开闭原则的关键就在于抽象,把系统的所有可能的行为抽象成一个抽象底层,这个抽象底层规 ...
- android nagative drawer图标跟标题适配
<?xml version="1.0" encoding="utf-8"?> <resources> <string name=& ...
- 开放封闭原则(Open Closed Principle)
在面向对象的设计中有很多流行的思想,比如说 "所有的成员变量都应该设置为私有(Private)","要避免使用全局变量(Global Variables)",& ...
- 最少知识原则(Least Knowledge Principle)
最少知识原则(Least Knowledge Principle),或者称迪米特法则(Law of Demeter),是一种面向对象程序设计的指导原则,它描述了一种保持代码松耦合的策略.其可简单的归纳 ...
- 接口分离原则(Interface Segregation Principle)
接口分离原则(Interface Segregation Principle)用于处理胖接口(fat interface)所带来的问题.如果类的接口定义暴露了过多的行为,则说明这个类的接口定义内聚程度 ...
- 依赖倒置原则(Dependency Inversion Principle)
很多软件工程师都多少在处理 "Bad Design"时有一些痛苦的经历.如果发现这些 "Bad Design" 的始作俑者就是我们自己时,那感觉就更糟糕了.那么 ...
随机推荐
- 【转】DataSource高级应用
我们知道 DataSource能提供最高性能的对数据库的并发访问,但是,对DataSource的引用,也还有很多知识要弄清楚,获取Connection的方式是数据库性能最相关的技术,而对DataSou ...
- 原来现在很多人都用SignalR来实现Chat Room
今天从一个业余开发的群里,看到有人要求这样一个项目需求: 1,)学员可以通过在线课堂找到自己喜欢的老师和课程. 2,)每个人可以建立自己课堂,每个课堂扣分多个子房间,交流群.设置管理员:有录音功能,可 ...
- nodejs发起HTTPS请求并获取数据
摘要:在网站中有时候需要跨域请求数据,直接用Ajax无法实现跨域,采用其他方式需要根据不同的浏览器做相应的处理.用Nodejs可以很好的解决这些问题,后台引用HTTPS模块,发送和返回的数据均为JSO ...
- mysql的binlog安全删除
理论上,应该在配置文件/etc/my.cnf中加上binlog过期时间的配置项,expire_logs_days = 10 但是如果没有加这一项,随着产生越来越多的binlog,磁盘被吃掉了不少.可以 ...
- C++Primer 第十五章
//1.面向对象程序设计的核心思想是数据抽象,继承,动态绑定. // 通过使用数据抽象,我们可以将类的接口和实现分离 // 使用继承,可以定义相似的类型并对其相似关系建模 // 使用动态绑定,可以在一 ...
- Leetcode: Arithmetic Slices
A sequence of number is called arithmetic if it consists of at least three elements and if the diffe ...
- 树形DP(Rebuilding Roads poj1947)
题意:给出一颗树,求要形成一颗元素个数是p的子树,最少要去掉多少边 #include"stdio.h" #include"string.h" #include& ...
- [摘录]quarts:Quartz Quick Start Guide
(Primarily authored by Dafydd James) Welcome to the QuickStart guide for Quartz. As you read this gu ...
- windows namedPipe 命名管道clent and server
1.client: #include "iostream" #include "windows.h" using namespace std; void mai ...
- logstash学习2
从geoip字段取location的longitude字段 [geoip][location][0] 支持变量内插 "the longitude is %{[geoip][location] ...