Problem 1: Given an array of real number with length (n+ 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 mdenote

the length of the longest increasing subarray(LIS) beginning with element ai , thus under the assumption above we

have: for all 1 ≤ i ≤n+ 1, 1 ≤ mi ≤ n. Therefore by drawer principle we have mk1 = mk2  = ...  = mk(n+1),(k< k2 <... < k(n+1)).

(otherwise we have nnumbers at most whilst we got n+ 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的更多相关文章

  1. pigeonhole principle 哈希表的重复问题(冲突)是不可避免的

    https://en.wikipedia.org/wiki/Pigeonhole_principle Sock-picking Assume a drawer contains a mixture o ...

  2. 抄书 Richard P. Stanley Enumerative Combinatorics Chapter 2 Sieve Methods

    2.1 Inclusion-Exclusion Roughly speaking, a "sieve method" in enumerative combinatorics is ...

  3. Atitit.软件开发的几大规则,法则,与原则Principle v3

    Atitit.软件开发的几大规则,法则,与原则Principle  v31.1. 修改历史22. 设计模式六大原则22.1. 设计模式六大原则(1):单一职责原则22.2. 设计模式六大原则(2):里 ...

  4. C#设计模式系列:开闭原则(Open Close Principle)

    1.开闭原则简介 开闭原则对扩展开放,对修改关闭,开闭原则是面向对象设计中可复用设计的基石. 2.开闭原则的实现 实现开闭原则的关键就在于抽象,把系统的所有可能的行为抽象成一个抽象底层,这个抽象底层规 ...

  5. android nagative drawer图标跟标题适配

    <?xml version="1.0" encoding="utf-8"?> <resources> <string name=& ...

  6. 开放封闭原则(Open Closed Principle)

    在面向对象的设计中有很多流行的思想,比如说 "所有的成员变量都应该设置为私有(Private)","要避免使用全局变量(Global Variables)",& ...

  7. 最少知识原则(Least Knowledge Principle)

    最少知识原则(Least Knowledge Principle),或者称迪米特法则(Law of Demeter),是一种面向对象程序设计的指导原则,它描述了一种保持代码松耦合的策略.其可简单的归纳 ...

  8. 接口分离原则(Interface Segregation Principle)

    接口分离原则(Interface Segregation Principle)用于处理胖接口(fat interface)所带来的问题.如果类的接口定义暴露了过多的行为,则说明这个类的接口定义内聚程度 ...

  9. 依赖倒置原则(Dependency Inversion Principle)

    很多软件工程师都多少在处理 "Bad Design"时有一些痛苦的经历.如果发现这些 "Bad Design" 的始作俑者就是我们自己时,那感觉就更糟糕了.那么 ...

随机推荐

  1. 使用javap反编译class文件

    一个普通的Java类: package org.ccnt.concurrence; public class VolatileTest { public static volatile int rac ...

  2. MVC 学习系列-Controller

    MVC最核心的也就是Controller了,控制器(controller)在功能中起到了核心功能. 1,)在MVC类库中,根据URL,通过MVCHandler进入MVC处理系统中, 2,)解析初始化对 ...

  3. node.js中使用node-schedule实现定时任务

    摘要:有时我们需要在每天的固定时间执行某个脚本,或者在某个固定时间执行某个任务.NodeJS中的 node-schedule 可以很好的实现定时任务. 1.安装 npm install node-sc ...

  4. JavaScript——DOM操作——Window.document对象

    一.找到元素: docunment.getElementById("id"):根据id找,最多找一个:    var a =docunment.getElementById(&qu ...

  5. Calculation控制台

    接口 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace s ...

  6. 部署ganglia3.7

    环境 centOS6.6 gmetad节点关闭iptable gmetad和httpd只需要在一台节点安装,gmond需要在每台节点上安装. 一.安装epel源 sudo wget http://do ...

  7. 【sinatra】安装测试

    $ gem install sinatra 测试: $ subl app.rb app.rb内容: require 'sinatra' get '/' do "Hello, World!&q ...

  8. SQL关于apply的两种形式cross apply和outer apply(转载)

    SQL 关于apply的两种形式cross apply 和 outer apply   apply有两种形式: cross apply 和 outer apply   先看看语法:   <lef ...

  9. Three.js - 网页3D应用的普及已经指日可待了

    Three.js可以高效实现3D效果,真不赖.

  10. php 缓存加速器软件

    Xcache 和 memcached 是两个不同层面的缓存,不存在可比性.Xcache 是 php 底层的缓存,它将PHP程式编译成字节码(byte code),再透过服务器上安装对应的程式来执行PH ...