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. java万物皆对象

    我们以Dom对象的形式 可以CRUD xml文件或xml字串(经流把xml文件读出转成字串) 我们以JsonObject对象的形式 可以CRUD json字串 还有正则表达式.ORM都是.

  2. Java NIO 读数据处理过程

    这两天仿hadoop 写java RPC框架,使用PB作为序列号工具,在写读数据的时候遇到一个小坑.之前写过NIO代码,恰好是错误的代码产生正确的逻辑,误以为自己写对了.现在简单整理一下. 使用NIO ...

  3. Lintcode: Nth to Last Node in List

    Find the nth to last element of a singly linked list. The minimum number of nodes in list is n. Exam ...

  4. fzu 2111 Min Number

      http://acm.fzu.edu.cn/problem.php?pid=2111  Problem 2111 Min Number Accept: 572    Submit: 1106Tim ...

  5. 活动组件(三):Intent

    大多数的安卓应用都不止一个Activity,而是有多个Activity.但是点击应用图标的时候,只会进入应用的主活动. 因此,前面我已经建立了一个主活动了,名字是myActivity,现在我再建立一个 ...

  6. php 随机生成

    php随机生成6位字符串: $str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';        $max = ...

  7. Codeforces Round #288 (Div. 2)

    A. Pasha and Pixels     题意就是给一个n*m的矩阵,k次操作,一开始矩阵全白,一次操作可以染黑一个格子,问第几次操作可以使得矩阵中存在一个2*2的黑色矩阵.直接模拟即可 代码: ...

  8. Android Handler简单使用

    package com.example.myhandlertest3; import android.os.Bundle; import android.os.Handler; import andr ...

  9. visio的简单用法

    visio图边缘会自动扩展 将常用工具放到收藏夹中,拖进去就可以用. 基本形状基本能够满足一般的需求. 支持自己定义形状,将定义好的形状右击组合之后,收藏到收藏夹或导出模版. 多用组合,收藏夹,调整图 ...

  10. 响应式框架pure--来自雅虎

    梦想还是要有  http://www.purecss.org/