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" 的始作俑者就是我们自己时,那感觉就更糟糕了.那么 ...
随机推荐
- Java基础之读文件——使用缓冲读取器读取文件(ReaderInputFromFile)
控制台程序,本例读取Java基础之写文件部分(WriterOutputToFile)写入的Saying.txt. import java.io.*; import java.nio.file.*; i ...
- mapreduce小结
(不断更新) MapReduce架构是一种分布式编程架构,它本质上是将任务划分,然后归并.它是以数据为中心的编程架构,相比与分布式计算和并行计算等,它更看重的是吞吐率.它处理的数据是PB级的数据,它并 ...
- Socket 编程
- Snapchat面经(师兄的)
给一个LinkedList环,给其中任一个节点的reference,求删去LinkedList中所有value=k的点 我的想法:假设给定的点事ListNode oneNode, 设置ListNode ...
- Leetcode: Word Pattern II
Given a pattern and a string str, find if str follows the same pattern. Here follow means a full mat ...
- web 前端:连接mysql中文乱码问题的解决办法
当使用tomcat部署servlet连接时,总是出现各种原因的中文乱码问题.有的是因为mysql的默认字符集的问题,有的是客户端的字符配置问题. 现在对于这两种问题进行配置,来解决乱码. 服务器端(m ...
- [转] linux中pam模块
一.pam简介 Linux-PAM(linux可插入认证模块)是一套共享库,使本地系统管理员可以随意选择程序的认证方式. 换句话说,不用(重新编写)重新编译一个包含PAM功能的应用程序,就可以改变它使 ...
- JavaScript: basis
ref: http://www.imooc.com/code/387 1. html里直接嵌入js: <!DOCTYPE HTML> <html> <head> & ...
- ligerui_ligerTree_002_利用JavaScript代码配置ligerTree节点
利用JavaScript代码配置ligerTree节点: 源码地址:http://download.csdn.net/detail/poiuy1991719/8571255 效果图: <%@ p ...
- 在TextView上加上下划线或中划线
在做商城项目是需要用到原价格以及降价后的价格,不可避免用到下划线或中划线 textView.getPaint().setFlags(Paint. UNDERLINE_TEXT_FLAG ); //下 ...